Dear All,
Does anyone know any way to directly pass a lambda as a functor to an interpolation function? For example, the signature of the linear interpolation function: template < class ForwardIterator, class Functor>requires Functor to provide a type Functor::result_type. This makes it impossible to pass a raw lambda. Of course one could wrap the lambda with e.g. std::function, but in many cases this is not optimal performancewise nor stylewise. Is there any other way to pass a raw lambda that I am not aware of? If not, are there any plans to support lambdas in future releases? Best, Panos 
Hello, The simplest to keep your lambda is probably to modify the CGAL
function: replacing the instances of ::result_type in linear_interpolation()
by typename boost::result_of<ValueFunctor(typename
std::iterator_traits<ForwardIterator>::value_type::first_type)>::type::first_type will make it work with lambdas as well as more traditional
inputs. I'll make a patch for CGAL to use result_of in the Interpolation
package. Best, On 06/14/2018 12:54 PM, Panagiotis
Zestanakis wrote:

Thank you, Mael! On Thu, Jun 14, 2018 at 4:48 PM Mael <[hidden email]> wrote:

Please see this pull request for the patch on the whole Interpolation package. Best, On 06/15/2018 11:45 AM, Panagiotis
Zestanakis wrote:

Free forum by Nabble  Edit this page 