From 6b1e666866f9395fae04a13590547504ea9b948f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 20 Dec 2024 15:36:09 +0100 Subject: [PATCH] Remove superfluous code in Lazy_construction --- Filtered_kernel/include/CGAL/Lazy.h | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 08bb4378220..bff1ad6a64a 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -1436,23 +1436,10 @@ struct Lazy_construction template struct is_optional_variant > > : std::true_type { }; - template - struct result { - // this does not default, if you want to make a lazy lazy-kernel, - // you are on your own - }; - - template - struct result - { - // @todo why the Type_mapper, just for a std::decay? - typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type type; - }; - template decltype(auto) - operator()(const L&... l) const { - // @todo why the Type_mapper, just for a std::decay? + 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; @@ -1460,7 +1447,7 @@ struct Lazy_construction // ----------------------- FT ----------------------- if constexpr (std::is_same_v) { - typedef Lazy_exact_nt>> result_type; + typedef Lazy_exact_nt> result_type; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); { @@ -1550,12 +1537,7 @@ struct Lazy_construction // boost::optional > (Intersection_23 result types) else if constexpr (is_optional_variant::value) { - typedef typename result::type result_type; - - // typedef decltype(std::declval()(std::declval::type>(), - // std::declval::type>())) AT; - // typedef decltype(std::declval()(std::declval::type>(), - // std::declval::type>())) ET; + typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type result_type; CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); { @@ -1598,7 +1580,7 @@ struct Lazy_construction // ----------------------- GENERIC ----------------------- else { - typedef typename result::type result_type; + typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type result_type; static const bool noprune = Disable_lazy_pruning::value;