From 6e8e4a4b1020459727ae70d7ab2a1a1e86bbffed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 13:17:37 +0100 Subject: [PATCH] remove variadic template workaround for cmap, gmap, and lcell --- BGL/examples/BGL_LCC/range_lcc.cpp | 2 - BGL/examples/BGL_polyhedron_3/range.cpp | 2 - .../include/CGAL/Combinatorial_map.h | 649 ----- .../include/CGAL/Dart_const_iterators.h | 67 +- .../include/CGAL/Dart_iterators.h | 198 -- .../Combinatorial_map_internal_functors.h | 2 - .../CGAL/internal/Combinatorial_map_utility.h | 119 - .../Combinatorial_map_utility_novariadic.h | 2574 ----------------- .../include/CGAL/GMap_dart_const_iterators.h | 66 - .../include/CGAL/GMap_dart_iterators.h | 204 -- .../include/CGAL/Generalized_map.h | 608 ---- .../Generalized_map_internal_functors.h | 2 - .../include/CGAL/Linear_cell_complex_base.h | 60 - 13 files changed, 1 insertion(+), 4552 deletions(-) delete mode 100644 Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h diff --git a/BGL/examples/BGL_LCC/range_lcc.cpp b/BGL/examples/BGL_LCC/range_lcc.cpp index d33676676b4..6e1e30aefbb 100644 --- a/BGL/examples/BGL_LCC/range_lcc.cpp +++ b/BGL/examples/BGL_LCC/range_lcc.cpp @@ -37,12 +37,10 @@ void fct(const LCC& lcc) { vertex_range vr(vertices(lcc)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif std::cout << "BOOST_FOREACH" << std::endl; BOOST_FOREACH(vertex_descriptor vd, vr){ diff --git a/BGL/examples/BGL_polyhedron_3/range.cpp b/BGL/examples/BGL_polyhedron_3/range.cpp index 48343cca787..dfddcdebf5d 100644 --- a/BGL/examples/BGL_polyhedron_3/range.cpp +++ b/BGL/examples/BGL_polyhedron_3/range.cpp @@ -36,12 +36,10 @@ void fct(const Polyhedron& p) { vertex_range vr(vertices(p)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif std::cout << "BOOST_FOREACH" << std::endl; BOOST_FOREACH(vertex_descriptor vd, vr){ diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 341789472da..9ccf7126441 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -431,7 +431,6 @@ namespace CGAL { * is unmarked for all the marks. * @return a Dart_handle on the new dart. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > Dart_handle create_dart(const Args&... args) { @@ -439,90 +438,6 @@ namespace CGAL { init_dart(res); return res; } -#else - Dart_handle create_dart() - { - Dart_handle res=mdarts.emplace(); - init_dart(res); - return res; - } - template < typename T1 > - Dart_handle create_dart(const T1 &t1) - { - Dart_handle res=mdarts.emplace(t1); - init_dart(res); - return res; - } - template < typename T1, typename T2 > - Dart_handle create_dart(const T1 &t1, const T2 &t2) - { - Dart_handle res=mdarts.emplace(t1, t2); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3) - { - Dart_handle res=mdarts.emplace(t1, t2, t3); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8, const T9 &t9) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - init_dart(res); - return res; - } -#endif /** Erase a dart from the list of darts. * @param adart the dart to erase. @@ -731,8 +646,6 @@ namespace CGAL { /// @return the betas of ADart (beta are used in the same order than /// they are given as parameters) - -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template Dart_handle beta(Dart_handle ADart, Betas... betas) { return CGAL::internal::Beta_functor:: @@ -749,119 +662,6 @@ namespace CGAL { Dart_const_handle beta(Dart_const_handle ADart) const { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } -#else - Dart_handle beta(Dart_handle ADart, int B1) - { return this->get_beta(ADart, B1); } - Dart_handle beta(Dart_handle ADart, int B1, int B2) - { return beta(beta(ADart, B1), B2); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3) - { return beta(beta(ADart, B1), B2, B3); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4) - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5) - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_handle beta(Dart_handle ADart) - { return this->template get_beta(ADart); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - - Dart_const_handle beta(Dart_const_handle ADart, int B1) const - { return this->get_beta(ADart, B1); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2) const - { return beta(beta(ADart, B1), B2); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3) const - { return beta(beta(ADart, B1), B2, B3); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4) const - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5) const - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return this->template get_beta(ADart); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } -#endif // Generic function to iterate on CMap or GMap in a generic way bool is_previous_exist(Dart_const_handle ADart) const @@ -1505,7 +1305,6 @@ namespace CGAL { /// Create a new attribute. /// @return a handle on the new attribute. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template typename Attribute_handle::type create_attribute(const Args&... args) { @@ -1521,152 +1320,6 @@ namespace CGAL { (this->template attributes(), res); return res; } -#else - template - typename Attribute_handle::type - create_attribute() - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1); - // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". - this->template init_attribute_ref_counting(res); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, - const T9 &t9) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } -#endif /// Erase an attribute. /// @param h a handle to the attribute to erase. @@ -2815,7 +2468,6 @@ namespace CGAL { return res; } -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //************************************************************************** // Dart_of_orbit_basic_range template @@ -2894,307 +2546,6 @@ namespace CGAL { darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** -#else - //************************************************************************** - // Dart_of_orbit_basic_range - template - struct Dart_of_orbit_basic_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > Base; - - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, - size_type /*amark*/=INVALID_MARK): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_basic_const_range - template - struct Dart_of_orbit_basic_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_basic_const_range(const Self &amap, - Dart_const_handle adart, size_type amark=INVALID_MARK): - Base(amap, adart, amark) - {} - }; - //************************************************************************** - // Dart_of_orbit_range - template - struct Dart_of_orbit_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - Base; - - Dart_of_orbit_range(Self &amap, Dart_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_const_range - template - struct Dart_of_orbit_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - /// @return a range on all the darts of the given orbit - Dart_of_orbit_range<> darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit - (Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range - darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - // Const versions. - Dart_of_orbit_const_range<> darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit - (Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range - (*this,adart); } - //-------------------------------------------------------------------------- - // Basic versions - Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - Dart_of_orbit_basic_const_range<> darts_of_orbit_basic - (Dart_const_handle adart,size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range - darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //************************************************************************** -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - //************************************************************************** // Dart_of_cell_basic_range template struct Dart_of_cell_basic_range: public CGAL::CMap_range diff --git a/Combinatorial_map/include/CGAL/Dart_const_iterators.h b/Combinatorial_map/include/CGAL/Dart_const_iterators.h index 389081b2f5a..40ec329ac14 100644 --- a/Combinatorial_map/include/CGAL/Dart_const_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_const_iterators.h @@ -38,7 +38,7 @@ namespace CGAL { * - CMap_dart_const_iterator_basic_of_involution_inv */ //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES + template class CMap_dart_const_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -92,71 +92,6 @@ namespace CGAL { it.get_first_dart()) {} }; -#else - //**************************************************************************** - template - class CMap_dart_const_iterator_basic_of_orbit: - public CMap_dart_iterator_basic_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_basic_of_orbit Self; - typedef CMap_dart_iterator_basic_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - typedef typename Map_::size_type size_type; - - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart, - size_type amark): - Base(amap,adart,amark) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_basic_of_orbit - (const CMap_dart_iterator_basic_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart(), - it.mmark_number) - {} - }; - //**************************************************************************** - template - class CMap_dart_const_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - - /// Main constructor. - CMap_dart_const_iterator_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_of_orbit - (const CMap_dart_iterator_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart()) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_const_iterator_basic_of_all: diff --git a/Combinatorial_map/include/CGAL/Dart_iterators.h b/Combinatorial_map/include/CGAL/Dart_iterators.h index c8172f0038f..d9b6b3607bd 100644 --- a/Combinatorial_map/include/CGAL/Dart_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_iterators.h @@ -45,97 +45,8 @@ namespace CGAL { /* Class CMap_dart_iterator_basic_of_orbit: to iterate * on the darts of the orbit */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic; -#else - template - class CMap_dart_iterator_basic_of_orbit_generic; - - template - struct Get_CMap_dart_iterator_basic_of_orbit; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // Case when Beta... is empty: iterator of self template @@ -994,7 +905,6 @@ namespace CGAL { //**************************************************************************** /* Generic nD version. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic: public CMap_extend_iterator - class CMap_dart_iterator_basic_of_orbit_generic: - public CMap_extend_iterator - ::type, B3> - { - public: - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Self; - - typedef CMap_extend_iterator - ::type, B3> Base; - - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Map Map; - typedef typename Map::size_type size_type; - - /// True iff this iterator is basic - typedef Tag_true Basic_iterator; - - public: - /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - size_type amark): - Base(amap, adart, amark) - {} - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // TODO? we can optimize the iterators when // 1 class CMap_dart_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -1080,33 +958,6 @@ namespace CGAL { Base(amap,adart,amark) {} }; -#else - //**************************************************************************** - template - class CMap_dart_iterator_basic_of_orbit: - public Get_CMap_dart_iterator_basic_of_orbit::type - { - public: - typedef CMap_dart_iterator_basic_of_orbit - Self; - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Base; - - typedef typename Map::Dart_handle Dart_handle; - typedef typename Map::size_type size_type; - - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): - Base(amap,adart,amark) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** /* Class CMap_dart_iterator_basic_of_all: to iterate onto all the * darts of the map. @@ -1789,7 +1640,6 @@ namespace CGAL { //*************************ITERATORS*NON*BASIC******************************** //**************************************************************************** //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_of_orbit_generic: public CMap_non_basic_iterator - class CMap_dart_iterator_of_orbit_generic: - public CMap_non_basic_iterator::type> - { - public: - typedef CMap_dart_iterator_of_orbit_generic Self; - typedef CMap_non_basic_iterator::type> Base; - - typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1): - Base(amap, adart1) - {} - }; - //**************************************************************************** - template - class CMap_dart_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit(Map& amap, Dart_handle adart): - Base(amap, adart) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_iterator_of_cell: diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h index 26286c5f5c7..8e1e4098fa5 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h @@ -984,7 +984,6 @@ struct Reverse_orientation_of_connected_component_functor }; // **************************************************************************** // Beta functor, used to combine several beta. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template struct Beta_functor; @@ -1036,7 +1035,6 @@ struct Beta_functor_static { return Beta_functor_static:: run(AMap, AMap.template get_beta(ADart)); } }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES // **************************************************************************** template diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h index 3ffbdec6657..9d3c9b2d792 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -81,8 +81,6 @@ namespace CGAL struct Get_attributes_tuple { typedef typename T::Attributes type; }; -#if ! defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && \ - ! defined(CGAL_CFG_NO_CPP0X_TUPLE) // Convert a tuple in a same tuple where each void type was replaced into // CGAL::Void. template @@ -377,10 +375,6 @@ namespace CGAL template static void run(T& ... ){} }; -#else - // Definitions of structs are moved to another file. -#include -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //Apply a functor to each element of a tuple template { typedef CGAL::Void type; }; -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES // To iterate onto each enabled attributes template struct Foreach_enabled_attributes @@ -619,118 +612,6 @@ namespace CGAL static void run(Ts& ... t) { Foreach_static_restricted_except::run(t...); } }; -#else - // This one cannot be moved in Combinatorial_map_utility_novariadic.h - // because this is an inner struct which uses inner type Attributes. - template - struct Foreach_enabled_attributes - { - static void run() - {Foreach_static_restricted::run();} - - template - static void run(T1& t1) - {Foreach_static_restricted::run(t1);} - - template - static void run(T1& t1,T2& t2) - {Foreach_static_restricted::run(t1,t2);} - - template - static void run(T1& t1,T2& t2,T3& t3) - {Foreach_static_restricted::run(t1,t2,t3);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4) - {Foreach_static_restricted::run(t1,t2,t3,t4);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5,t6);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5, - t6,t7);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5,t6, - t7,t8);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8, - T9& t9) - {Foreach_static_restricted::run(t1,t2,t3,t4, - t5,t6,t7,t8,t9);} - }; - // This one cannot be moved in Combinatorial_map_utility_novariadic.h - // because this is an inner struct which uses inner type Attributes. - template - struct Foreach_enabled_attributes_except - { - static void run() - {Foreach_static_restricted_except::run();} - - template - static void run(T1& t1) - {Foreach_static_restricted_except::run(t1);} - - template - static void run(T1& t1,T2& t2) - {Foreach_static_restricted_except::run(t1,t2);} - - template - static void run(T1& t1,T2& t2,T3& t3) - {Foreach_static_restricted_except::run(t1,t2,t3);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4) - {Foreach_static_restricted_except::run(t1,t2,t3,t4);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5, - t6,t7);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6, - t7,t8);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8, - T9& t9) - {Foreach_static_restricted_except::run(t1,t2,t3,t4, - t5,t6,t7,t8,t9);} - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES }; } //namespace internal diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h deleted file mode 100644 index d5110578a1f..00000000000 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h +++ /dev/null @@ -1,2574 +0,0 @@ -// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0+ -// -// Author(s) : Guillaume Damiand -// -#ifndef CGAL_INTERNAL_COMBINATORIAL_MAP_UTILITY_NOVARIADIC_H -#define CGAL_INTERNAL_COMBINATORIAL_MAP_UTILITY_NOVARIADIC_H 1 - -#if defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) || defined(CGAL_CFG_NO_CPP0X_TUPLE) -#include -#include - -// This file is included in Combinatorial_map_utility.h, in the namespace -// CGAL::internal -//------------------------------------------------------------------------------ -template -struct Convert_tuple_with_void; - -template <> -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple<> type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -//------------------------------------------------------------------------------ -template -struct My_length; - -template <> -struct My_length > -{ - static const int value = 0; -}; -template -struct My_length > -{ - static const int value = 1; -}; -template -struct My_length > -{ - static const int value = 2; -}; -template -struct My_length > -{ - static const int value = 3; -}; -template -struct My_length > -{ - static const int value = 4; -}; -template -struct My_length > -{ - static const int value = 5; -}; -template -struct My_length > -{ - static const int value = 6; -}; -template -struct My_length > -{ - static const int value = 7; -}; -template -struct My_length > -{ - static const int value = 8; -}; -template -struct My_length > -{ - static const int value = 9; -}; -//------------------------------------------------------------------------------ -template -struct Number_of_different_type_in_tuple; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value=0; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value=boost::is_same::value?0:1; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; -//------------------------------------------------------------------------------ -template ::value-1> -struct Nb_type_different_in_tuple_up_to_k; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos=dim; - static const int value= pos==k? - boost::is_same::value?-dim-1:0 : 0; -}; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos= Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos = Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k,dim >::value) - :0 - ); -}; - - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos= Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim >{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; -//------------------------------------------------------------------------------ -//Convert a tuple of T... to a tuple of Functor::type... -template