diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 1dc7f2f12a2..067fbe57463 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -116,9 +116,9 @@ templateinline std::enable_if_t::value, unsigned> dept // For an iterator, exact/approx applies to the objects it points to template ::value>> -auto exact(T const& t) {return make_transforming_iterator(t,[](auto const&u){return CGAL::exact(u);});} +auto exact(T const& t) {return make_transforming_iterator(t,[](auto const&u)->decltype(auto){return CGAL::exact(u);});} template ::value>> -auto approx(T const& t) {return make_transforming_iterator(t,[](auto const&u){return CGAL::approx(u);});} +auto approx(T const& t) {return make_transforming_iterator(t,[](auto const&u)->decltype(auto){return CGAL::approx(u);});} template ::value>> unsigned depth(T const&) {return 1;} // FIXME: depth(*t) would be better when t is valid, but not for end iterators, and the true answer would iterate on the range, but we can't do that with only one iterator... We need to replace iterators with ranges to solve that.