diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h b/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h index 1fff3e19a49..323537d6776 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h @@ -60,8 +60,6 @@ class Filtered_predicate2 C2E c2e; C2A c2a; - typedef typename AP::result_type Ares; - public: typedef AP Approximate_predicate; @@ -92,7 +90,7 @@ public: try { // No forward here, the arguments may still be needed - Ares res = ap(c2a(args)...); + auto res = ap(c2a(args)...); if (is_certain(res)) return get_certain(res); } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h index 3022ec4997a..93d279361dc 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h @@ -49,15 +49,15 @@ template struct Point_converter_help,K1,K2> { typedef typename Get_type::type argument_type; typedef typename Get_type::type result_type; - template - result_type help(Indices, K1 const& k1, K2 const& k2, C const& conv, argument_type const& p) const { + template + result_type help(std::index_sequence, K1 const& k1, K2 const& k2, C const& conv, argument_type const& p) const { typename Get_functor::type cc(k1); typename Get_functor >::type cp(k2); return cp(conv(cc(p,I))...); } template result_type operator()(K1 const& k1, K2 const& k2, C const& conv, argument_type const& p) const { - return help(typename N_increasing_indices::type(),k1,k2,conv,p); + return help(std::make_index_sequence(),k1,k2,conv,p); } }; } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h b/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h index 4434182c382..913700ba800 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h @@ -85,8 +85,8 @@ template struct Construct_segment : Store_kernel { result_type operator()(T&&, U&& u, V&& v)const{ CP cp(this->kernel()); result_type r = {{ - call_on_tuple_elements(cp, std::forward(u)), - call_on_tuple_elements(cp, std::forward(v)) }}; + call_on_tuple_elements(cp, std::forward(u)), + call_on_tuple_elements(cp, std::forward(v)) }}; return r; } }; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index 1153a19bafc..bc8427d3355 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -91,7 +91,7 @@ template struct Orientation_of_points,true> typedef typename Get_type::type Point; typedef typename Get_type::type result_type; templatestruct Help; - templatestruct Help > { + templatestruct Help > { template result_type operator()(C const&c,P const&x,T&&t)const{ return sign_of_determinant(c(std::get(t),I%d)-c(x,I%d)...); } @@ -99,7 +99,7 @@ template struct Orientation_of_points,true> template result_type operator()(P0 const&x,P&&...p)const{ static_assert(d==sizeof...(P),"Wrong number of arguments"); typename Get_functor::type c(this->kernel()); - return Help::type>()(c,x,std::forward_as_tuple(std::forward

(p)...)); + return Help>()(c,x,std::forward_as_tuple(std::forward

(p)...)); } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/utils.h b/NewKernel_d/include/CGAL/NewKernel_d/utils.h index 7b7981bc2ae..245ac8a4f38 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/utils.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/utils.h @@ -149,32 +149,23 @@ struct Has_type_different_from template struct result { typedef typename std::iterator_traits::reference type; }; - template typename result::type + template decltype(auto) operator()(It const&i)const{ return *i; } }; - template struct Indices{}; - template struct Next_increasing_indices; - template struct Next_increasing_indices > { - typedef Indices type; - }; - template struct N_increasing_indices { - typedef typename Next_increasing_indices::type>::type type; - }; - template<> struct N_increasing_indices<0> { typedef Indices<> type; }; namespace internal { - template inline typename std::result_of::type - do_call_on_tuple_elements(F&&f, std::tuple&&t, Indices&&) { + template inline decltype(auto) + do_call_on_tuple_elements(F&&f, std::tuple&&t, std::index_sequence&&) { return f(std::get(std::move(t))...); } } // internal - template - inline typename std::result_of::type + template + inline decltype(auto) call_on_tuple_elements(F&&f, std::tuple&&t) { return internal::do_call_on_tuple_elements(std::forward(f),std::move(t), - typename N_increasing_indices::type()); + std::make_index_sequence()); } template struct Factory {