diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h index e86699e226c..51d3aa1de94 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute.h @@ -389,7 +389,7 @@ namespace CGAL { template < unsigned int, typename> friend struct GMap_dart; - template + template friend class Compact_container_with_index; template @@ -498,7 +498,7 @@ namespace CGAL { template friend struct GMap_dart; - template + template friend class Compact_container_with_index; template @@ -610,7 +610,7 @@ namespace CGAL { template < unsigned int, class, class, class, class > friend class Combinatorial_map_base; - template + template friend class Compact_container_with_index; public: @@ -639,7 +639,7 @@ namespace CGAL { template < unsigned int, class, class, class, class > friend class Combinatorial_map_base; - template + template friend class Compact_container_with_index; public: diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 5c58b71772f..2aae356f46d 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -403,26 +403,6 @@ namespace CGAL { // Thus we initialize null_dart_handle in the Combinatorial_map constructor #endif // CGAL_CMAP_DEPRECATED -template -class MyIndex -{ -public: - MyIndex(size_t s=-1) : idx(s) - {} - operator size_t() const - { return idx; } - MyIndex& operator++() - { ++idx; return *this; } - MyIndex operator++(int) - { MyIndex res(*this); ++idx; return res; } - MyIndex& operator--() - { --idx; return *this; } - MyIndex operator--(int) - {MyIndex res(*this); --idx; return res;} -private: - T idx; -}; - // Storage with combinatorial maps using index template class Combinatorial_map_storage_2 @@ -436,12 +416,13 @@ private: typedef typename Dart_wrapper::Dart Dart; typedef typename Alloc_::template rebind::other Dart_allocator; + typedef unsigned int size_type; // Type used as index. + typedef Compact_container_with_index_2 > + Constant_size_policy_for_cc_with_size<1024>, size_type > Dart_container; typedef CGAL::Tag_true Use_index; - typedef typename Dart_container::size_type size_type; typedef Items_ Items; typedef Alloc_ Alloc; @@ -450,7 +431,7 @@ private: struct Container_for_attributes : public Compact_container_with_index_2::other, - Constant_size_policy_for_cc_with_size<1024> > + Constant_size_policy_for_cc_with_size<1024>, size_type > {}; /// Typedef for attributes @@ -460,23 +441,18 @@ private: struct Attribute_type: public Helper::template Attribute_type {}; template - struct Attribute_handle: public CGAL::MyIndex // public Helper::template Attribute_handle - { - explicit Attribute_handle(size_t s=-1) : MyIndex(s) - {} - }; + struct Attribute_handle: public Helper::template Attribute_handle + {}; template - struct Attribute_const_handle:public CGAL::MyIndex//Helper::template Attribute_const_handle - { - explicit Attribute_const_handle(size_t s=-1) : MyIndex(s) - {} - }; + struct Attribute_const_handle: + public Helper::template Attribute_const_handle + {}; template struct Attribute_range: public Helper::template Attribute_range {}; template struct Attribute_const_range: - public Helper::template Attribute_const_range + public Helper::template Attribute_const_range {}; /// Number of marks @@ -487,11 +463,7 @@ private: // typedef unsigned int Dart_index; // typedef MyIndex Dart_index; - struct Dart_index : public CGAL::MyIndex - { - explicit Dart_index(size_t s=-1) : MyIndex(s) - {} - }; + typedef typename Dart_container::Index Dart_index; // Definition of old types, for backward compatibility. typedef Dart_index Dart_handle; diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 87902c9e1fa..ef4f6e82209 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -135,34 +135,21 @@ public: typedef std::reverse_iterator const_reverse_iterator; static const size_type bottom; - class handle : public internal::Handle + class Index : public internal::MyIndex { public: - typedef typename Compact_container_with_index::size_type size_type; + typedef internal::MyIndex Base; - explicit handle(size_type _idx= (std::numeric_limits::max)()/2) - : Handle(_idx) + explicit Index(size_type idx=(std::numeric_limits::max)()/2) + : Base(idx) {} - handle(const_iterator it) - : Handle(it) + Index(const const_iterator& it) : Base(it) {} - handle(iterator it) - : Handle(it) + Index(const iterator& it) : Base(it) {} - - bool operator==(const handle& rhs) const - { - return idx() == rhs.idx(); - } - - bool operator<(const handle& rhs) const - { - return idx() < rhs.idx(); - } - }; friend class internal::CC_iterator_with_index; @@ -640,13 +627,10 @@ private: // Sets the pointer part and the type of the pointee. static void static_set_type(T& e, Type t) { - // This out of range compare is always true and causes lots of - // unnecessary warnings. - // CGAL_precondition(0 <= t && t < 2); Traits::size_t(e) &= ( ~mask_type | ( ((size_type)t) <<(nbbits_size_type_m1) ) ); } - // get the value of the element (removing the two bits) + // get the value of the element (removing the used bit) static size_type static_get_val(const T& e) { return (Traits::size_t(e) & ~mask_type); } @@ -680,7 +664,7 @@ private: block_size = Incr_policy::first_block_size; capacity_ = 0; size_ = 0; - free_list = bottom; + free_list = bottom; all_items = All_items(); } @@ -692,7 +676,7 @@ private: All_items all_items; }; template < class T, class Allocator, class Increment_policy, class IndexType > - const typename Compact_container_with_index::size_type Compact_container_with_index::bottom = (std::numeric_limits::size_type>::max)()/2 -1; + const typename Compact_container_with_index::size_type Compact_container_with_index::bottom = (std::numeric_limits::size_type>::max)()/2; /*template < class T, class Allocator, class Increment_policy > void Compact_container_with_index::merge(Self &d) @@ -952,77 +936,67 @@ namespace internal { }*/ template - class Handle - { - public: + class MyIndex + { + public: + typedef MyIndex Self; + typedef IT size_type; - typedef IT size_type; + /// Constructor. Default construction creates a kind of "NULL" index. + /// max/2 because the most significant bit must be equal to 0 (used). + explicit MyIndex(size_type idx=(std::numeric_limits::max)()/2) + : m_idx(idx) + {} - /// Constructor. Default construction creates an invalid handle. - explicit Handle(size_type _idx= (std::numeric_limits::max)()/2) : idx_(_idx) {} + /// Get the underlying index + operator size_t() const + { return m_idx; } - /// Get the underlying index of this handle - size_type idx() const { return idx_; } + /// reset index to be NULL + void reset() + { m_idx = (std::numeric_limits::max)()/2; } - size_type& idx() { return idx_; } + /// return whether the handle is valid + bool is_valid() const + { return m_idx != (std::numeric_limits::max)()/2; } - /// reset handle to be invalid - void reset() { idx_= (std::numeric_limits::max)()/2; } + /// are two indices equal? + bool operator==(const Self& rhs) const + { return m_idx == rhs.m_idx; } - /// return whether the handle is valid - bool is_valid() const { return idx_ != (std::numeric_limits::max)()/2; } + /// are two handles different? + bool operator!=(const Self& rhs) const + { return m_idx != rhs.m_idx; } - /// are two handles equal? - bool operator==(const T& _rhs) const { - return idx_ == _rhs.idx_; - } + /// Comparisons + bool operator<(const Self& rhs) const + { return m_idx < rhs.m_idx; } + bool operator>(const Self& rhs) const + { return m_idx > rhs.m_idx; } + bool operator<=(const Self& rhs) const + { return m_idx <= rhs.m_idx; } + bool operator>=(const Self& rhs) const + { return m_idx >= rhs.m_idx; } - /// are two handles different? - bool operator!=(const Handle& _rhs) const { - return idx_ != _rhs.idx_; - } + /// Increment the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// increment. + Self& operator++() { ++m_idx; return *this; } + /// Decrement the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// decrement. + Self& operator--() { --m_idx; return *this; } - /// Comparison by index. - bool operator<(const Handle& _rhs) const { - return idx_ < _rhs.idx_; - } - - /// Increment the internal index. This operations does not - /// guarantee that the index is valid or undeleted after the - /// increment. - Handle& operator++() { ++idx_; return *this; } - /// Decrement the internal index. This operations does not - /// guarantee that the index is valid or undeleted after the - /// decrement. - Handle& operator--() { --idx_; return *this; } - - /// Increment the internal index. This operations does not - /// guarantee that the index is valid or undeleted after the - /// increment. - Handle operator++(int) { Handle tmp(*this); ++idx_; return tmp; } - /// Decrement the internal index. This operations does not - /// guarantee that the index is valid or undeleted after the - /// decrement. - Handle operator--(int) { Handle tmp(*this); --idx_; return tmp; } - private: - size_type idx_; - }; - - template - class Handle2 : public Handle - { - typedef Handle Base; - public: - - /// Constructor. Default construction creates an invalid handle. - explicit Handle2(size_type _cc_idx, size_type _idx = (std::numeric_limits::max)()/2) - : Base(_idx), cc_idx_(_cc_idx) {} - - size_type cc_idx() const { return cc_idx_; } - - size_type& cc_idx() { return cc_idx_; } -public: - size_type cc_idx_; + /// Increment the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// increment. + Self operator++(int) { Self tmp(*this); ++m_idx; return tmp; } + /// Decrement the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// decrement. + Self operator--(int) { Self tmp(*this); --m_idx; return tmp; } + private: + size_type m_idx; }; } // namespace internal diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index_2.h b/Combinatorial_map/include/CGAL/Compact_container_with_index_2.h index 42ec99acb41..2dd39c17483 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index_2.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index_2.h @@ -95,34 +95,21 @@ public: static const size_type bottom; - class handle : public internal::Handle + class Index : public internal::MyIndex { public: - typedef typename Compact_container_with_index_2::size_type size_type; + typedef internal::MyIndex Base; - explicit handle(size_type _idx= (std::numeric_limits::max)()/2) - : Handle(_idx) + explicit Index(size_type idx=(std::numeric_limits::max)()/2) + : Base(idx) {} - handle(const_iterator it) - : Handle(it) + Index(const const_iterator& it) : Base(it) {} - handle(iterator it) - : Handle(it) + Index(const iterator& it) : Base(it) {} - - bool operator==(const handle& rhs) const - { - return idx() == rhs.idx(); - } - - bool operator<(const handle& rhs) const - { - return idx() < rhs.idx(); - } - }; friend class internal::CC_iterator_with_index; friend class internal::CC_iterator_with_index; @@ -240,12 +227,12 @@ public: // (just forward the arguments to the constructor, to optimize a copy). #ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > - size_type emplace(const Args&... args) + Index emplace(const Args&... args) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret = free_list; T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -255,12 +242,12 @@ public: } #else // inserts a default constructed item. - size_type emplace() + Index emplace() { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -271,13 +258,12 @@ public: } template < typename T1 > - size_type - emplace(const T1 &t1) + Index emplace(const T1 &t1) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -287,13 +273,12 @@ public: } template < typename T1, typename T2 > - size_type - emplace(const T1 &t1, const T2 &t2) + Index emplace(const T1 &t1, const T2 &t2) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -303,13 +288,12 @@ public: } template < typename T1, typename T2, typename T3 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -319,13 +303,12 @@ public: } template < typename T1, typename T2, typename T3, typename T4 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -335,14 +318,13 @@ public: } template < typename T1, typename T2, typename T3, typename T4, typename T5 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, + const T5 &t5) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -353,14 +335,13 @@ public: template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, + const T5 &t5, const T6 &t6) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -371,14 +352,13 @@ public: template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, + const T5 &t5, const T6 &t6, const T7 &t7) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -389,14 +369,13 @@ public: template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8 > - size_type - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) + Index emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, + const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -406,12 +385,12 @@ public: } #endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - size_type insert(const T &t) + Index insert(const T &t) { if (free_list == bottom) allocate_new_block(); - size_type ret = free_list; + Index ret(free_list); T& e = operator[](free_list); static_set_type(e, USED); free_list = static_get_val(e); @@ -434,7 +413,7 @@ public: insert(first, last); } - void erase(size_type x) + void erase(Index x) { CGAL_precondition(type(x) == USED); T& e = operator[](x); @@ -563,7 +542,7 @@ private: // Get the type of the pointee. static Type static_type(const T& e) // TODO check if this is ok for little and big endian - { return (Type) ((Traits::size_t(e) & mask_type)>>(nbbits_size_type_m1)); } + { return (Type) ((size_type(e) & mask_type)>>(nbbits_size_type_m1)); } Type type(size_type e) const { return static_type(operator[](e)); } @@ -574,19 +553,19 @@ private: // This out of range compare is always true and causes lots of // unnecessary warnings. // CGAL_precondition(0 <= t && t < 2); - Traits::size_t(e) &= ( ~mask_type | ( ((size_type)t) <<(nbbits_size_type_m1) ) ); + size_type(e) &= ( ~mask_type | ( ((size_type)t) <<(nbbits_size_type_m1) ) ); } // get the value of the element (removing the two bits) static size_type static_get_val(const T& e) - { return (Traits::size_t(e) & ~mask_type); } + { return (size_type(e) & ~mask_type); } size_type get_val(size_type e) const { return static_get_val(operator[](e)); } // set the value of the element and its type static void static_set_val(T& e, size_type v, Type t) - { Traits::size_t(e)=v | ( ((size_type)t) <<(nbbits_size_type_m1)); } + { size_type(e)=v | ( ((size_type)t) <<(nbbits_size_type_m1)); } void set_val(size_type e, size_type v, Type t) { static_set_val(operator[](e), v, t); } @@ -616,7 +595,7 @@ private: template < class T, class Allocator, class Increment_policy, class IndexType > const typename Compact_container_with_index_2::size_type -Compact_container_with_index_2::bottom = (std::numeric_limits::size_type>::max)()/2 -1; +Compact_container_with_index_2::bottom = (std::numeric_limits::size_type>::max)()/2; /*template < class T, class Allocator, class Increment_policy, class IndexType > void Compact_container_with_index::merge(Self &d) diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 27303172ab2..5672f8419c3 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -68,10 +68,10 @@ namespace CGAL { template friend class Compact_container; - template + template friend class Compact_container_with_index; - template + template friend class Compact_container_with_index_2; template @@ -365,10 +365,10 @@ namespace CGAL { template friend class Compact_container; - template + template friend class Compact_container_with_index; - template + template friend class Compact_container_with_index_2; template @@ -538,17 +538,13 @@ namespace CGAL { public: size_type for_compact_container_with_index() const - { return st; } + { return mbeta[0]; } size_type& for_compact_container_with_index() - { return st; } + { return mbeta[0]; } protected: - union - { - size_type st; - /// Beta for each dimension +1 (from 0 to dimension). - Dart_handle mbeta[dimension+1]; - }; + /// Beta for each dimension +1 (from 0 to dimension). + Dart_handle mbeta[dimension+1]; /// Values of Boolean marks. mutable std::bitset mmarks; diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h index 19f8c982b37..832c64791e1 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -393,17 +393,27 @@ namespace CGAL typedef typename CMap::template Container_for_attributes type; }; + template + struct GetIndexOrHandle + { typedef typename T::iterator type; }; + template + struct GetIndexOrHandle + { typedef typename T::Index type; }; + template + struct GetConstIndexOrConstHandle + { typedef typename T::const_iterator type; }; + template + struct GetConstIndexOrConstHandle + { typedef typename T::Index type; }; + // defines as type Compact_container::iterator template struct Add_compact_container_iterator{ typedef typename CMap::Alloc::template rebind::other Attr_allocator; typedef typename CMap::template Container_for_attributes::iterator iterator_type; - - // TODO case when there is no Use_index typedef in CMap - typedef typename boost::mpl::if_ - < typename boost::is_same::type, - typename CMap::Dart_handle, iterator_type >::type type; + typedef typename GetIndexOrHandle + >::type type; }; // defines as type Compact_container::const_iterator @@ -412,10 +422,8 @@ namespace CGAL typedef typename CMap::Alloc::template rebind::other Attr_allocator; typedef typename CMap::template Container_for_attributes:: const_iterator iterator_type; - - typedef typename boost::mpl::if_ - < typename boost::is_same::type, - typename CMap::Dart_handle, iterator_type >::type type; + typedef typename GetConstIndexOrConstHandle + >::type type; }; // All the attributes (with CGAL::Void) diff --git a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h index 123cef29b79..69667e0f176 100644 --- a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h +++ b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h @@ -69,7 +69,7 @@ namespace CGAL { template friend class Compact_container; - template + template friend class Compact_container_with_index; template @@ -130,11 +130,11 @@ namespace CGAL { template friend class Compact_container; - template + template friend class Compact_container_with_index; - template - friend class Compact_container_2; + template + friend class Compact_container_with_index_2; public: typedef Cell_attribute friend class Combinatorial_map_base; - template + template friend class Compact_container_with_index; public: @@ -238,7 +238,7 @@ namespace CGAL { template < unsigned int, class, class, class, class > friend class Combinatorial_map_base; - template + template friend class Compact_container_with_index; public: diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_storages.h index 001b08a3563..01ef95ecc2a 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_storages.h @@ -449,12 +449,13 @@ namespace CGAL { typedef typename Dart_wrapper::Dart Dart; typedef typename Alloc_::template rebind::other Dart_allocator; + typedef unsigned int size_type; // Type used as index. + typedef Compact_container_with_index_2 > + Constant_size_policy_for_cc_with_size<1024>, size_type > Dart_container; typedef CGAL::Tag_true Use_index; - typedef typename Dart_container::size_type size_type; typedef Items_ Items; typedef Alloc_ Alloc; @@ -463,7 +464,7 @@ namespace CGAL { struct Container_for_attributes : public Compact_container_with_index_2::other, - Constant_size_policy_for_cc_with_size<1024> > + Constant_size_policy_for_cc_with_size<1024>, size_type > {}; /// Typedef for attributes @@ -473,23 +474,12 @@ namespace CGAL { struct Attribute_type: public Helper::template Attribute_type {}; template - struct MyAttribute_handle: public CGAL::MyIndex // public Helper::template Attribute_handle - { - MyAttribute_handle(size_t s=-1) : MyIndex(s) - {} - }; + struct Attribute_handle: public Helper::template Attribute_handle + {}; template - struct Attribute_handle - {typedef MyAttribute_handle type;}; - template - struct MyAttribute_const_handle:public CGAL::MyIndex//Helper::template Attribute_const_handle - { - MyAttribute_const_handle(size_t s=-1) : MyIndex(s) - {} - }; - template - struct Attribute_const_handle - {typedef MyAttribute_const_handle type;}; + struct Attribute_const_handle: + public Helper::template Attribute_const_handle + {}; template struct Attribute_range: public Helper::template Attribute_range {}; @@ -505,11 +495,7 @@ namespace CGAL { static const unsigned int dimension = d_; // typedef unsigned int Dart_index; - struct Dart_index : public CGAL::MyIndex - { - Dart_index(size_t s=-1) : MyIndex(s) - {} - }; + typedef typename Dart_container::Index Dart_index; // Definition of old types, for backward compatibility. typedef Dart_index Dart_handle;