diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h index ef52449df94..c5b07dcac33 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h @@ -58,8 +58,6 @@ namespace CGAL { Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Dart_container; - // typedef unsigned int Dart_index; - // typedef MyIndex Dart_index; typedef typename Dart_container::Index Dart_index; // Definition of old types, for backward compatibility. @@ -480,7 +478,7 @@ namespace CGAL { /// null_handle template typename Combinatorial_map_storage_2::Null_handle_type - Combinatorial_map_storage_2::null_handle((std::numeric_limits::max)()/2); + Combinatorial_map_storage_2::null_handle((std::numeric_limits::max)()/2); } // namespace CGAL diff --git a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h index 7fc51f9f651..38b4a483179 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h @@ -58,8 +58,6 @@ namespace CGAL { Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Dart_container; - // typedef unsigned int Dart_index; - // typedef MyIndex Dart_index; typedef typename Dart_container::Index Dart_index; // Definition of old types, for backward compatibility. @@ -431,7 +429,7 @@ namespace CGAL { /// null_handle template typename Generalized_map_storage_2::Null_handle_type - Generalized_map_storage_2::null_handle((std::numeric_limits::max)()/2); + Generalized_map_storage_2::null_handle((std::numeric_limits::max)()/2); } // namespace CGAL diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index 38d000f9d06..78909b5abbc 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -40,13 +40,14 @@ namespace CGAL { // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Traits_, class Items_, class Alloc_> class CMap_linear_cell_complex_storage_1 { public: using Self=CMap_linear_cell_complex_storage_1; + Items_, Alloc_>; using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; typedef typename Traits_::Point Point; typedef typename Traits_::Vector Vector; @@ -75,6 +76,8 @@ namespace CGAL { typedef std::nullptr_t Null_handle_type; static const Null_handle_type null_handle; + using Type_for_compact_container=void*; + typedef Items_ Items; typedef Alloc_ Alloc; template @@ -481,9 +484,9 @@ namespace CGAL { template const typename CMap_linear_cell_complex_storage_1::Null_handle_type + Items_, Alloc_>::Null_handle_type CMap_linear_cell_complex_storage_1::null_handle = nullptr; + Items_, Alloc_>::null_handle = nullptr; } // namespace CGAL diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h index 403195a9d2f..574915140b6 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h @@ -38,26 +38,24 @@ namespace CGAL { // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Items_, class Alloc_> class CMap_linear_cell_complex_storage_2 { public: using Self=CMap_linear_cell_complex_storage_2; + Items_, Alloc_>; using Use_index=CGAL::Tag_true; - using Index_type=Index_type_; - - typedef typename Traits_::Point Point; - typedef typename Traits_::Vector Vector; - typedef typename Traits_::FT FT; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; typedef internal::Combinatorial_map_helper Helper; + using Index_type=typename internal::Get_index_type::type; + typedef typename Items_::template Dart_wrapper Dart_wrapper; typedef typename internal::template Get_dart_info::type Dart_info; - typedef CGAL::Index::Dart Dart; + typedef CGAL::Dart Dart; typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; @@ -78,6 +76,8 @@ namespace CGAL { typedef Dart_index Null_handle_type; static Null_handle_type null_handle; + using Type_for_compact_container=Index_type; + typedef Items_ Items; typedef Alloc_ Alloc; template @@ -503,18 +503,18 @@ namespace CGAL { /// null_dart_handle template - typename CMap_linear_cell_complex_storage_2:: - Dart_index CMap_linear_cell_complex_storage_2:: + class Items_, class Alloc_> + typename CMap_linear_cell_complex_storage_2:: + Dart_index CMap_linear_cell_complex_storage_2:: null_dart_handle(0); /// null_handle template - typename CMap_linear_cell_complex_storage_2:: + class Items_, class Alloc_> + typename CMap_linear_cell_complex_storage_2:: Null_handle_type CMap_linear_cell_complex_storage_2:: - null_handle((std::numeric_limits::max)()/2); + Items_, Alloc_>:: + null_handle((std::numeric_limits::max)()/2); } // namespace CGAL diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index 6368d7c9e30..40d3d5b184b 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -40,13 +40,14 @@ namespace CGAL { // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Traits_, class Items_, class Alloc_> class GMap_linear_cell_complex_storage_1 { public: using Self=GMap_linear_cell_complex_storage_1; + Items_, Alloc_>; using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; typedef typename Traits_::Point Point; typedef typename Traits_::Vector Vector; @@ -75,6 +76,8 @@ namespace CGAL { typedef std::nullptr_t Null_handle_type; static const Null_handle_type null_handle; + using Type_for_compact_container=void*; + typedef Items_ Items; typedef Alloc_ Alloc; template @@ -467,11 +470,11 @@ namespace CGAL { /// null_handle template + class Traits_, class Items_, class Alloc_> const typename GMap_linear_cell_complex_storage_1::Null_handle_type + Items_, Alloc_>::Null_handle_type GMap_linear_cell_complex_storage_1::null_handle = nullptr; + Items_, Alloc_>::null_handle = nullptr; } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h index a90309c3fcd..febe11c38db 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h @@ -38,26 +38,28 @@ namespace CGAL { // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Items_, class Alloc_> class GMap_linear_cell_complex_storage_2 { public: using Self=GMap_linear_cell_complex_storage_2; + Items_, Alloc_>; using Use_index=CGAL::Tag_true; - using Index_type=Index_type_; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + + typedef internal::Combinatorial_map_helper Helper; + + using Index_type=typename internal::Get_index_type::type; typedef typename Traits_::Point Point; typedef typename Traits_::Vector Vector; typedef typename Traits_::FT FT; - typedef internal::Combinatorial_map_helper Helper; - typedef typename Items_::template Dart_wrapper Dart_wrapper; typedef typename internal::template Get_dart_info::type Dart_info; - typedef CGAL::Index::Dart Dart; + typedef CGAL::Dart Dart; typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; @@ -66,8 +68,6 @@ namespace CGAL { Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Dart_container; - // typedef unsigned int Dart_index; - // typedef MyIndex Dart_index; typedef typename Dart_container::Index Dart_index; // Definition of old types, for backward compatibility. @@ -78,6 +78,8 @@ namespace CGAL { typedef Dart_index Null_handle_type; static Null_handle_type null_handle; + using Type_for_compact_container=Index_type; + typedef Items_ Items; typedef Alloc_ Alloc; template @@ -133,7 +135,7 @@ namespace CGAL { // Init void init_storage() - { null_dart_handle=nullptr; } + {} void clear_storage() {} @@ -421,13 +423,13 @@ namespace CGAL { void dart_link_alpha(Dart_handle adart, Dart_handle adart2) { CGAL_assertion(i <= dimension); - CGAL_assertion(adart!=nullptr && adart2!=nullptr); + CGAL_assertion(adart!=null_handle && adart2!=null_handle); mdarts[adart].mf[i] = adart2; } void dart_link_alpha(Dart_handle adart, Dart_handle adart2, unsigned int i) { CGAL_assertion(i <= dimension); - CGAL_assertion(adart!=nullptr && adart2!=nullptr); + CGAL_assertion(adart!=null_handle && adart2!=null_handle); mdarts[adart].mf[i] = adart2; } @@ -438,12 +440,12 @@ namespace CGAL { template void dart_unlink_alpha(Dart_handle adart) { - CGAL_assertion(adart!=nullptr && i <= dimension); + CGAL_assertion(adart!=null_handle && i <= dimension); mdarts[adart].mf[i] = adart; } void dart_unlink_alpha(Dart_handle adart, unsigned int i) { - CGAL_assertion(adart!=nullptr && i <= dimension); + CGAL_assertion(adart!=null_handle && i <= dimension); mdarts[adart].mf[i] = adart; } @@ -459,11 +461,11 @@ namespace CGAL { /// null_handle template - typename GMap_linear_cell_complex_storage_2:: + class Items_, class Alloc_> + typename GMap_linear_cell_complex_storage_2:: Null_handle_type GMap_linear_cell_complex_storage_2:: - null_handle((std::numeric_limits::max)()/2); + Items_, Alloc_>:: + null_handle((std::numeric_limits::max)()/2); } // namespace CGAL