diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index ce31b355bf2..29076772270 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -1074,10 +1074,10 @@ struct Lazy_construction_nt { template auto operator()(L const&...l) const -> - Lazy_exact_nt>> + Lazy_exact_nt> { - typedef std::remove_cv_t> ET; - typedef std::remove_cv_t> AT; + typedef CGAL::cpp20::remove_cvref_t ET; + typedef CGAL::cpp20::remove_cvref_t AT; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); { Protect_FPU_rounding P; @@ -1440,13 +1440,13 @@ struct Lazy_construction decltype(auto) operator()(const L&... l) const { - typedef typename Type_mapper()(std::declval::type>()...)),EK,EK>::type ET; - typedef typename Type_mapper()(std::declval::type>()...)),AK,AK>::type AT; - typedef Lazy Handle; + typedef typename Type_mapper::type...>, AK, AK>::type AT; // ----------------------- FT ----------------------- if constexpr (std::is_same_v) { + typedef typename Type_mapper::type...>,EK,EK>::type ET; + typedef Lazy_exact_nt> result_type; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); @@ -1481,14 +1481,13 @@ struct Lazy_construction // ----------------------- CGAL::Object ----------------------- else if constexpr (std::is_same_v) { - typedef CGAL::Object result_type; typedef Lazy Lazy_object; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); { Protect_FPU_rounding P; try { - Lazy_object lo(new Lazy_rep_n(ac, ec, l...)); + Lazy_object lo(new Lazy_rep_n(ac, ec, l...)); if(lo.approx().is_empty()) return Object(); @@ -1531,13 +1530,15 @@ struct Lazy_construction CGAL_BRANCH_PROFILER_BRANCH(tmp); Protect_FPU_rounding P2(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - ET eto = ec(CGAL::exact(l)...); + CGAL::Object eto = ec(CGAL::exact(l)...); return make_lazy(eto); } // std::optional > (Intersection_23 result types) else if constexpr (is_optional_variant::value) { - typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type result_type; + typedef typename Type_mapper::type...>,EK,EK>::type ET; + + typedef typename Type_mapper::type...>, AK, LK>::type result_type; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); { @@ -1580,7 +1581,10 @@ struct Lazy_construction // ----------------------- GENERIC ----------------------- else { - typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type result_type; + typedef typename Type_mapper::type...>,EK,EK>::type ET; + + typedef Lazy Handle; + typedef typename Type_mapper::type...>, AK, LK>::type result_type; static const bool noprune = Disable_lazy_pruning::value; @@ -1602,8 +1606,8 @@ struct Lazy_construction decltype(auto) operator()() const { - typedef decltype(std::declval()()) AT; - typedef decltype(std::declval()()) ET; + typedef std::invoke_result_t AT; + typedef std::invoke_result_t ET; typedef Lazy Handle; typedef typename Type_mapper::type result_type;