diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index d47830abf21..16d800d60a8 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -328,6 +328,14 @@ namespace CGAL { Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const { return internal::Beta_functor:: run(ADart, betas...); } + template + Dart_handle beta(Dart_handle ADart) const + { return internal::Beta_functor_static:: + run(ADart); } + template + Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const + { return internal::Beta_functor_static:: + run(ADart); } #else Dart_handle beta(Dart_handle ADart, int B1) { return internal::Beta_functor::run(ADart, B1); } @@ -1080,7 +1088,7 @@ namespace CGAL { template void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2) { - CGAL_static_assertion( i>=2 && i<=dimension ); + CGAL_assertion( i>=2 && i<=dimension ); CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2); CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle); adart1->template basic_link_beta(adart2); @@ -1132,9 +1140,9 @@ namespace CGAL { { CGAL_assertion(adart1 != NULL && adart2 != NULL); CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle); - Helper::template Foreach_enabled_attributes - >:: - run(this,adart1,adart2,0); + Helper::template Foreach_enabled_attributes_except + , 1>:: + run(this,adart1,adart2); adart1->basic_link_beta<0>(adart2); adart2->basic_link_beta<1>(adart1); } @@ -1152,9 +1160,9 @@ namespace CGAL { { CGAL_assertion(adart1 != NULL && adart2 != NULL); CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle); - Helper::template Foreach_enabled_attributes - >:: - run(this,adart1,adart2,1); + Helper::template Foreach_enabled_attributes_except + , 1>:: + run(this,adart1,adart2); adart1->basic_link_beta<1>(adart2); adart2->basic_link_beta<0>(adart1); } @@ -1182,19 +1190,6 @@ namespace CGAL { adart1->template basic_link_beta(adart2); adart2->template basic_link_beta(adart1); } - // TODO remove ? - void link_beta_for_involution(Dart_handle adart1, Dart_handle adart2, - unsigned int i) - { - CGAL_assertion(adart1 != NULL && adart2 != NULL && adart1!=adart2 ); - CGAL_assertion(adart1 != null_dart_handle && adart2 != null_dart_handle); - CGAL_assertion( 2<=i && i<=dimension ); - Helper::template Foreach_enabled_attributes - >:: - run(this,adart1,adart2,i); - adart1->basic_link_beta(adart2, i); - adart2->basic_link_beta(adart1, i); - } /** Double link two darts, and update the NULL attributes. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked @@ -1212,13 +1207,6 @@ namespace CGAL { else if ( i==1 ) link_beta_1(adart1, adart2); else link_beta_for_involution(adart1, adart2); } - // TODO remove ? - void link_beta(Dart_handle adart1, Dart_handle adart2, unsigned int i) - { - if ( i==0 ) link_beta_0(adart1, adart2); - else if ( i==1 ) link_beta_1(adart1, adart2); - else link_beta_for_involution(adart1, adart2, i); - } /** Double link a dart with betai to a second dart. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked @@ -1246,9 +1234,9 @@ namespace CGAL { */ void unlink_beta_0(Dart_handle adart) { - CGAL_assertion(adart!=NULL && !adart->is_free<0>()); - adart->beta<0>()->unlink_beta<1(); - adart->unlink_beta<0>(); + CGAL_assertion(adart!=NULL && !adart->template is_free<0>()); + adart->template beta<0>()->template unlink_beta<1>(); + adart->template unlink_beta<0>(); } /** Double unlink a dart with beta 1. @@ -1260,9 +1248,9 @@ namespace CGAL { */ void unlink_beta_1(Dart_handle adart) { - CGAL_assertion(adart!=NULL && !adart->is_free<1>()); - adart->beta<1>()->unlink_beta<0>(); - adart->unlink_beta<1>(); + CGAL_assertion(adart!=NULL && !adart->template is_free<1>()); + adart->template beta<1>()->template unlink_beta<0>(); + adart->template unlink_beta<1>(); } /** Double unlink a dart with beta i, for i>=2. @@ -1277,10 +1265,10 @@ namespace CGAL { void unlink_beta_for_involution(Dart_handle adart) { CGAL_assertion(adart!=NULL && adart!=null_dart_handle && - !adart->is_free()); + !adart->template is_free()); CGAL_assertion(2<=i && i<=dimension); - adart->beta()->unlink_beta(); - adart->unlink_beta(); + adart->template beta()->template unlink_beta(); + adart->template unlink_beta(); } void unlink_beta_for_involution(Dart_handle adart, unsigned int i) { diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index e7a178032e4..db807fc5a64 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -36,6 +36,8 @@ namespace CGAL { * @param adart a dart of the facet to triangulate. * @return A dart incident to the new vertex. */ +// TODO revoir toute la gestion des attributs +// (utilisation correcte des link avec/sans la maj) template < class Map > typename Map::Dart_handle insert_cell_0_in_cell_2(Map& amap, typename Map::Dart_handle adart) @@ -73,16 +75,17 @@ namespace CGAL { if ( cur!=first ) { - if ( amap.template degroup_attribute_of_dart<2>(first, cur) ) + // TODO + //if ( amap.template degroup_attribute_of_dart<2>(first, cur) ) { // TODO Functor takiing a range, an attrib_handle, and that set // all the darts of the range to this handle - for (typename Map::template Dart_of_involution_range<1>::iterator + /* for (typename Map::template Dart_of_involution_range<1>::iterator it=template darts_of_involution<1>(dh2).begin(), itend=template darts_of_involution<1>(dh2).end(); it!=itend; ++it) { - } + }*/ tosplit.push(internal::Couple_dart_and_dim (first,cur,2)); @@ -107,7 +110,7 @@ namespace CGAL { amap.link_beta_0(n1, n2); if (n1 != NULL && prev != NULL) - amap.link_beta_for_involution(prev, n1, 2); + amap.template link_beta_for_involution<2>(prev, n1); for (unsigned int dim=3; dim<=Map::dimension; ++dim) { @@ -119,7 +122,7 @@ namespace CGAL { { nn1=amap.create_dart(); amap.link_beta_1(cur->beta(dim), nn1); - amap.link_beta_for_involution(n1, nn1, dim); + amap.basic_link_beta_for_involution(n1, nn1, dim); } else nn1=NULL; @@ -127,7 +130,7 @@ namespace CGAL { { nn2=amap.create_dart(); amap.link_beta_0(cur->beta(dim), nn2); - amap.link_beta_for_involution(n2, nn2, dim); + amap.basic_link_beta_for_involution(n2, nn2, dim); } else nn2=NULL; @@ -135,7 +138,7 @@ namespace CGAL { amap.basic_link_beta_1(nn1, nn2); if (nn1 != NULL && prev != NULL) - amap.link_beta_for_involution(nn1, prev->beta(dim), 2); + amap.basic_link_beta_for_involution(nn1, prev->beta(dim), 2); amap.mark(cur->beta(dim), treated); tounmark.push(cur->beta(dim)); @@ -143,9 +146,9 @@ namespace CGAL { else { if ( n1!=NULL ) - amap.link_beta_for_involution(n1, cur->beta(dim)->beta(1), dim); + amap.basic_link_beta_for_involution(n1, cur->beta(dim)->beta(1), dim); if ( n2!=NULL ) - amap.link_beta_for_involution(n2, cur->beta(dim)->beta(0), dim); + amap.basic_link_beta_for_involution(n2, cur->beta(dim)->beta(0), dim); } } } @@ -155,13 +158,13 @@ namespace CGAL { if (n2 != NULL) { - amap.link_beta_for_involution(first->beta(0), n2, 2); + amap.template link_beta_for_involution<2>(first->beta(0), n2); for (unsigned int dim=3; dim<=Map::dimension; ++dim) { if ( !adart->is_free(dim) ) { - amap.link_beta_for_involution(first->beta(0)->beta(dim), - n2->beta(dim), 2); + amap.basic_link_beta_for_involution(first->beta(0)->beta(dim), + n2->beta(dim), 2); } } } @@ -209,7 +212,8 @@ namespace CGAL { for (CMap_dart_const_iterator_of_cell it(amap, adart); res && it.cont(); ++it) { - if (it->beta(i+2)->beta(i+1) != it->beta_inv(i+1)->beta(i+2) ) + if (it->template beta()->template beta()!= + it->template beta_inv()->template beta() ) res = false; } return res; @@ -257,8 +261,8 @@ namespace CGAL { it.cont(); ++it ) { to_erase.push_back(it); - if ( !it->is_free(i+1) && dg1==NULL ) - { dg1=it; dg2=it->beta(i+1); } + if ( !it->template is_free() && dg1==NULL ) + { dg1=it; dg2=it->template beta(); } amap.mark(it, mark); ++res; } @@ -1143,7 +1147,7 @@ namespace CGAL { amap.template basic_link_beta<1>(*it, d1); // TODO remove this group, and use link_beta instead ? - amap.group_all_dart_attributes_except(*it, d1, 1); + //amap.group_all_dart_attributes_except(*it, d1, 1); amap.mark(*it, mark); } @@ -1215,7 +1219,7 @@ namespace CGAL { amap.template basic_link_beta<1>(d1,d2); } - amap.link_beta_for_involution(d1, d2, 2); + amap.template link_beta_for_involution<2>(d1, d2); for ( unsigned int dim=3; dim<=Map::dimension; ++dim) { diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index d41ae09192e..b219a46f459 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -101,7 +101,7 @@ namespace CGAL { template bool is_free() const { - CGAL_static_assertion(i <= dimension); + CGAL_assertion(i <= dimension); return mbeta[i] == Refs::null_dart_handle; } bool is_free(unsigned int i) const @@ -128,7 +128,7 @@ namespace CGAL { template Dart_handle beta() { - CGAL_static_assertion(i <= dimension); + CGAL_assertion(i <= dimension); return mbeta[i]; } Dart_handle beta(unsigned int i) @@ -139,7 +139,7 @@ namespace CGAL { template Dart_const_handle beta() const { - CGAL_static_assertion(i <= dimension); + CGAL_assertion(i <= dimension); return mbeta[i]; } Dart_const_handle beta(unsigned int i) const @@ -268,7 +268,7 @@ namespace CGAL { template void basic_link_beta(Dart_handle adart) { - CGAL_static_assertion(i <= dimension); + CGAL_assertion(i <= dimension); CGAL_assertion(this!=&*Refs::null_dart_handle); mbeta[i] = adart; } @@ -285,7 +285,7 @@ namespace CGAL { template void unlink_beta() { - CGAL_static_assertion(i <= dimension); + CGAL_assertion(i <= dimension); mbeta[i] = Refs::null_dart_handle; } void unlink_beta(unsigned int i) diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_functors.h index 75afd474674..2b7e21b5c94 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_functors.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_functors.h @@ -48,98 +48,160 @@ namespace CGAL { */ // ************************************************************************** - /// Functor used for link_beta to update the attributes of - /// adart2 on the attributes of this dart. - template::type> struct Group_attribute_functor_of_dart_run { - static void run(CMap* amap, + /// Group the i-attribute of dh1 and dh2. + /// @return true if the two attributes are grouped, false otherwise. + static bool run(CMap* amap, typename CMap::Dart_handle dh1, typename CMap::Dart_handle dh2) { CGAL_static_assertion(i<=CMap::dimension); + CGAL_static_assertion(i!=j); CGAL_static_assertion_msg(CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_of_dart_run but " "i-attributes are disabled"); CGAL_assertion( dh1!=NULL && dh2!=NULL ); - CGAL_assertion( dh1!=CMap::null_dart_handle && - dh2!=CMap::null_dart_handle ); T a1=dh1->template attribute(); T a2=dh2->template attribute(); // If the two attributes are equal, nothing to do. - if ( a1 == a2 ) return false; + if ( a1==a2 ) return false; - if ( a1==NULL ) amap->set_attribute_of_dart(dh1, a2); - else amap->set_attribute_of_dart(dh2, a1); + if ( a1==NULL ) amap->template set_attribute_of_dart(dh1, a2); + else amap->template set_attribute_of_dart(dh2, a1); + + return true; + } + }; + template + struct Group_attribute_functor_of_dart_run + { + static bool run(CMap* amap, + typename CMap::Dart_handle dh1, + typename CMap::Dart_handle dh2) + { + CGAL_static_assertion(j!=0 && j!=1); + bool res = false; + T a1=NULL, a2=NULL; + + // First extremity + typename CMap::Dart_handle od = dh2->other_extremity(); + if ( od!=NULL ) + { + a1=dh1->template attribute<0>(); + a2=od->template attribute<0>(); + + if ( a1==NULL && a2!=NULL ) + { + amap->template set_attribute_of_dart<0>(dh1, a2); + res = true; + } + } + + // Second extremity + od = dh1->other_extremity(); + if ( od!=NULL ) + { + a1=od->template attribute<0>(); + a2=dh2->template attribute<0>(); + + if ( a1!=NULL ) + { + amap->template set_attribute_of_dart<0>(dh2, a1); + res = true; + } + } + return res; } }; template - struct Group_attribute_functor_of_dart_run + struct Group_attribute_functor_of_dart_run { - static void run(CMap* amap, + static bool run(CMap* amap, typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2, - int adim) + typename CMap::Dart_handle dh2) { - CGAL_assertion( adim==-1 || - (0<=adim && (unsigned int)adim<=CMap::dimension) ); - // todo ASSERT (1<=adim && ...) ??? - if ( adim!=0 ) + typename CMap::Dart_handle od = dh2->other_extremity(); + if ( od!=NULL ) { - typename CMap::Dart_handle od = dh1->other_extremity(); - if ( od!=NULL ) + T a1=dh1->template attribute<0>(); + T a2=od->template attribute<0>(); + + if ( a1==NULL && a2!=NULL ) { - typename CMap::Helper::template Attribute_handle<0>::type - a1=od->template attribute<0>(); - if ( a1!=NULL && a1!=dh2->template attribute<0>() ) - amap->template set_attribute_of_dart<0>(dh2, a1); + amap->template set_attribute_of_dart<0>(dh1, a2); + return true; } } - if ( adim!=1 ) - { - typename CMap::Dart_handle od = dh2->other_extremity(); - if ( od!=NULL && dh1->template attribute<0>()==NULL ) - { - typename CMap::Helper::template Attribute_handle<0>::type - a2=od->template attribute<0>(); - if ( a2!=NULL ) - amap->template set_attribute_of_dart<0>(dh1, a2); - } - } + return false; } }; - template - struct Group_attribute_functor_of_dart_run + template + struct Group_attribute_functor_of_dart_run + { + static bool run(CMap* amap, + typename CMap::Dart_handle dh1, + typename CMap::Dart_handle dh2) + { + typename CMap::Dart_handle od = dh1->other_extremity(); + if ( od!=NULL ) + { + T a1=od->template attribute<0>(); + T a2=dh2->template attribute<0>(); + + if ( a1!=NULL ) + { + amap->template set_attribute_of_dart<0>(dh2, a1); + return true; + } + } + + return false; + } + }; + template + struct Group_attribute_functor_of_dart_run { static void run(CMap*, typename CMap::Dart_handle, + typename CMap::Dart_handle) + {} + }; + template + struct Group_attribute_functor_of_dart_run + { + static void run(CMap*, typename CMap::Dart_handle, - int) - { - } + typename CMap::Dart_handle) + {} }; /// Functor used for link_beta to update the attributes of - /// adart2 on the attributes of this dart, except for adim-attributes. + /// adart2 on the attributes of this dart, except for j-attributes. /// We define run to allows to use this functor with /// Foreach_enabled_attributes. - template + /// If you know i at compiling time, use directly + /// Group_attribute_functor_of_dart_run. + template struct Group_attribute_functor_of_dart { template - static void run(CMap* amap, + static bool run(CMap* amap, typename CMap::Dart_handle adart1, - typename CMap::Dart_handle adart2, int adim) + typename CMap::Dart_handle adart2) { - CGAL_assertion( adim==-1 || - (0<=adim && (unsigned int)adim<=CMap::dimension) ); - Group_attribute_functor_of_dart_run:: - run(amap,adart1,adart2,adim); + return Group_attribute_functor_of_dart_run:: + run(amap,adart1,adart2); } }; @@ -527,6 +589,27 @@ namespace CGAL { return ADart->beta(B); } }; + + template + struct Beta_functor_static; + + template + struct Beta_functor_static + { + static Dart_handle run(Dart_handle ADart) + { return Beta_functor_static:: + run(ADart->beta()); } + }; + + template + struct Beta_functor_static + { + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->beta(); + } + }; #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 80ea47bdf85..e5ff2591721 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -266,14 +266,14 @@ namespace CGAL }; template - struct Conditionnal_run + struct Conditionnal_run_except { template static void run(T...){} }; template - struct Conditionnal_run + struct Conditionnal_run_except { template static void run(T...){} @@ -526,8 +526,8 @@ namespace CGAL struct Attribute_const_range { typedef Void type; }; - // To iterate onto each enabled attributes #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES + // To iterate onto each enabled attributes template struct Foreach_enabled_attributes { @@ -535,13 +535,22 @@ namespace CGAL static void run(const Ts& ... t) { Foreach_static_restricted::run(t...); } }; + // To iterate onto each enabled attributes, except j-attributes + template + struct Foreach_enabled_attributes_except + { + template + static void run(const 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();} + static void run() + {Foreach_static_restricted::run();} template static void run(const T1& t1) @@ -590,6 +599,61 @@ namespace CGAL {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(const T1& t1) + {Foreach_static_restricted_except::run(t1);} + + template + static void run(const T1& t1,const T2& t2) + {Foreach_static_restricted_except::run(t1,t2);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3) + {Foreach_static_restricted_except::run(t1,t2,t3);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4) + {Foreach_static_restricted_except::run(t1,t2,t3,t4);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5) + {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6) + {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7) + {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5, + t6,t7);} + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8) + {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6, + t7,t8);} + + template + static void run(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) + {Foreach_static_restricted_except::run(t1,t2,t3,t4, + t5,t6,t7,t8,t9);} + }; #endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES }; diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h index 6052187d799..838c81acc62 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h @@ -920,6 +920,154 @@ struct Conditionnal_run const T6&,const T7&,const T8&,const T9&){} }; //------------------------------------------------------------------------------ +template +struct Conditionnal_run_except{ + static void run() + { + Functor:: template run(); + } + + template + static void run(const T1& t1) + { + Functor:: template run(t1); + } + + template + static void run(const T1& t1,const T2& t2) + { + Functor:: template run(t1,t2); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3) + { + Functor:: template run(t1,t2,t3); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4) + { + Functor:: template run(t1,t2,t3,t4); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5) + { + Functor:: template run(t1,t2,t3,t4,t5); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6) + { + Functor:: template run(t1,t2,t3,t4,t5,t6); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7) + { + Functor:: template run(t1,t2,t3,t4,t5,t6,t7); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8) + { + Functor:: template run(t1,t2,t3,t4,t5,t6,t7,t8); + } + + template + static void run(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) + { + Functor:: template run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Conditionnal_run_except +{ + static void run(){} + + template + static void run(const T1&){} + + template + static void run(const T1&,const T2&){} + + template + static void run(const T1&,const T2&,const T3&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&,const T8&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&,const T8&,const T9&){} +}; +//------------------------------------------------------------------------------ +template +struct Conditionnal_run_except +{ + static void run(){} + + template + static void run(const T1&){} + + template + static void run(const T1&,const T2&){} + + template + static void run(const T1&,const T2&,const T3&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&,const T8&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&, + const T6&,const T7&,const T8&,const T9&){} +}; +//------------------------------------------------------------------------------ template struct Foreach_static_restricted; @@ -1634,7 +1782,7 @@ struct Foreach_static_restricted,n>{ static void run(const T1&,const T2&,const T3&,const T4&,const T5&,const T6&, const T7&,const T8&,const T9&){} }; - +//------------------------------------------------------------------------------ template struct Beta_functor { @@ -1700,8 +1848,830 @@ struct Beta_functor return ADart->beta(B1)->beta(B2)->beta(B3)->beta(B4)->beta(B5)-> beta(B6)->beta(B7)->beta(B8)->beta(B9); } -}; + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta()->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta()->template beta() + ->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta()->template beta() + ->template beta()->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta()->template beta() + ->template beta()->template beta()->template beta(); + } + + template + static Dart_handle run(Dart_handle ADart) + { + CGAL_assertion( ADart!=NULL ); + return ADart->template beta()->template beta() + ->template beta()->template beta()->template beta() + ->template beta()->template beta()->template beta() + ->template beta(); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except; + +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except,n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except,n+1>:: + run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except,n+1>:: + run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except,n+1>:: + run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except,n+1>:: + run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except,n+1>:: + run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except, + n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except, + n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except, + n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except, + n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except, + n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except, + n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except, + n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except, + n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except, + n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except +,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except, + n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except, + n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except, + n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except +,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except,n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except,n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except,n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except,n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except,n+1>::run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except, + n+1>::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except,n+1>::run(); + } + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except,n+1>::run(t1); + } + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except,n+1>::run(t1,t2); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except,n+1>::run(t1,t2,t3); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n> +{ + static void run(){ + Conditionnal_run_except::run(); + Foreach_static_restricted_except,n+1>::run(); + } + + template + static void run(const T1& t1){ + Conditionnal_run_except::run(t1); + Foreach_static_restricted_except,n+1>::run(t1); + } + + template + static void run(const T1& t1,const T2& t2){ + Conditionnal_run_except::run(t1,t2); + Foreach_static_restricted_except,n+1>:: + run(t1,t2); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3){ + Conditionnal_run_except::run(t1,t2,t3); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3); + } + + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4){ + Conditionnal_run_except::run(t1,t2,t3,t4); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7); + } + template + static void run(const T1& t1,const T2& t2,const T3& t3,const T4& t4, + const T5& t5,const T6& t6,const T7& t7,const T8& t8){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8); + } + template + static void run(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){ + Conditionnal_run_except::run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + Foreach_static_restricted_except,n+1>:: + run(t1,t2,t3,t4,t5,t6,t7,t8,t9); + } +}; +//------------------------------------------------------------------------------ +template +struct Foreach_static_restricted_except,n>{ + static void run(){} + + template + static void run(const T1&){} + + template + static void run(const T1&,const T2&){} + + template + static void run(const T1&,const T2&,const T3&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&,const T6&) + {} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&,const T6&, + const T7&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&,const T6&, + const T7&,const T8&){} + + template + static void run(const T1&,const T2&,const T3&,const T4&,const T5&,const T6&, + const T7&,const T8&,const T9&){} +}; +//------------------------------------------------------------------------------ #endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h index b7d2ff67562..736d6330c7d 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h @@ -104,7 +104,7 @@ namespace CGAL { d1 = alcc.create_dart(initVertices[v1]); d2 = alcc.create_dart(initVertices[v2]); - alcc.link_beta(d1, d2, 2); + alcc.template link_beta<2>(d1, d2); testVertices[v1].push_back(d1); testVertices[v2].push_back(d2); @@ -418,7 +418,7 @@ namespace CGAL { else firstFacet = d; it = TC.find(j->opposite()); if (it != TC.end()) - alcc.link_beta(d, it->second, 2); + alcc.template link_beta<2>(d, it->second); prev = d; } while (++j != i->facet_begin());