diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index ae67e4a6938..43c87305bba 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -66,19 +68,22 @@ public: /// Constructor Implicit_to_labeling_function_wrapper(const Function_& f) - : r_f_(f) {} + : f_(f) {} // Default copy constructor, assignment operator, and destructor are ok /// Operator () return_type operator()(const Point_3& p) const { - return ( (r_f_(p)<0) ? 1 : 0 ); + return ( (f_(p)<0) ? 1 : 0 ); } private: + typedef typename boost::mpl::if_, + Function_*, + Function_>::type Stored_function; /// Function to wrap - const Function_& r_f_; + Stored_function f_; }; // end class Implicit_to_labeling_function_wrapper