Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] using lambdas with function interpolation

Subject: CGAL users discussion list

List archive

[cgal-discuss] using lambdas with function interpolation


Chronological Thread 
  • From: Panagiotis Zestanakis <>
  • To:
  • Subject: [cgal-discuss] using lambdas with function interpolation
  • Date: Thu, 14 Jun 2018 13:54:18 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:d4p1jBcM80GguVX9R4DKz+zNlGMj4u6mDksu8pMizoh2WeGdxcu7YB7h7PlgxGXEQZ/co6odzbaO7ua4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYb5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM2/2HZhMJzgqxGvhyuuwdyzJTIbIyPLvdyYr/RcNEcSGFcXshRTStBAoakYoUVFeUBO/xXr4b8p1sJsRu+BBKsD/7sxTBWnX/2wbc10+I7HgHF3QwgBM8FvXPMrNrvMqcSVvu1zajTwDXMavNZwzb96IzSfh89pvGMWKt9fMzMwkcsDwPIlkucpZDhMj+P1ekAs3KX4/R9We+ukWIrtgJ8riapy8wxkIfGnJgVxUrB9ShhwIY6O9m4SEljbN6hCpRQtiWaO5JvQsM+X21koSg6xqAFtJKlZiQKx5MnxxnQa/yDbYeE+A7sVOGUITtghXJlfqywhwqq/ES+1uHxUtO43VVKoyZfjNXAq3EA2wbO5sWEVPdx5kKh1iyO1wDX5OFEO0c0la/DJp452LEwkJ0TsV/CHyLtl0X2ibWZdkQg+uSy9+vnZbDmqoeGN4BokgH+LrgumsunDOskPQgBRWyb9f2h273i5k32XKhKjuYtkqTCq5DbJcEbprajDANP04Yj7Qy/Dza839gCk3kHNgENRBXShIfgPxTCIevzEOykq1WqijZigf7cbZP7BZCYFnHFmbjgeqp88AZuxREvxNZW5JNPQuUZKfT0QV3Zu9nRDxt/OAuxlbW0QO5h358TDDrcSpSSN7nf5AfRt7AfZtKUbYpQgw7Tbv0s5vrgl3g8wAZPcqyg3J9RY3e9TK0/fxepJEH0i9JEKl8k+xIkRbWz2lKHWD9XIX21WvBkv2xpOMedFY7GA7uVrvmB0SO8RMMEY2lHDhWVDS+tedzUAbEDbyWdJsInmTsBB+Cs

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>
typename Functor::result_type::first_type
linear_interpolation(ForwardIterator first, ForwardIterator beyond,
const typename
std::iterator_traits<ForwardIterator>::value_type::
second_type& norm,
Functor function_value)
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 performance-wise nor style-wise.  

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



Archive powered by MHonArc 2.6.18.

Top of Page