From c0c768b2bb4e5d37df0a9076ac6176bb319b8a82 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 5 Jun 2024 11:00:18 +0200 Subject: [PATCH 1/4] Bug fix: definition of Self and Base in class Cell_attribute_with_point when using index. --- Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 17c17d1b87bf..24099a248511 100644 --- a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h +++ b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h @@ -91,10 +91,10 @@ namespace CGAL { public: typedef Cell_attribute_with_point Self; + Functor_on_split_, WithID> Self; typedef Cell_attribute Base1; + Functor_on_merge_, Functor_on_split_, WithID> Base1; typedef Point_for_cell Base2; typedef typename LCC::Point Point; From 31f5aa5ad029af2531feb70865c203a1d0a034a0 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 5 Jun 2024 13:45:08 +0200 Subject: [PATCH 2/4] add missing friend --- .../include/CGAL/Cell_attribute_with_point_and_id.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h index 332290737e86..605030713873 100644 --- a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h +++ b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h @@ -32,6 +32,9 @@ namespace CGAL { template friend class Concurrent_compact_container; + template + friend class Compact_container_with_index; + public: typedef typename Base::Point Point; @@ -64,6 +67,9 @@ namespace CGAL { template friend class Concurrent_compact_container; + template + friend class Compact_container_with_index; + public: typedef typename Base::Point Point; From d3e88f29b877d92a619e1263d2fce36f5fcda797 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 5 Jun 2024 14:44:47 +0200 Subject: [PATCH 3/4] Use different number types for lcc with index in tests. --- .../test/Linear_cell_complex/Linear_cell_complex_2_test.cpp | 1 + .../test/Linear_cell_complex/Linear_cell_complex_3_test.cpp | 1 + .../test/Linear_cell_complex/Linear_cell_complex_4_test.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp index 28195f353548..e95db49c8758 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_2_test.cpp @@ -54,6 +54,7 @@ struct Myitems_2b { #ifdef USE_COMPACT_CONTAINER_WITH_INDEX typedef CGAL::Tag_true Use_index; + using Index_type=std::uint16_t; #endif template struct Dart_wrapper diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp index c1d6eb4cdfef..7f67127e926c 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_3_test.cpp @@ -60,6 +60,7 @@ struct Myitems_3b { #ifdef USE_COMPACT_CONTAINER_WITH_INDEX typedef CGAL::Tag_true Use_index; + using Index_type=std::uint32_t; #endif template struct Dart_wrapper diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp index 737e6b965ba2..3b99a61a9319 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_4_test.cpp @@ -57,6 +57,7 @@ struct Myitems_4b { #ifdef USE_COMPACT_CONTAINER_WITH_INDEX typedef CGAL::Tag_true Use_index; + using Index_type=std::uint64_t; #endif template struct Dart_wrapper From e4140c286f300d245a604422fc353f124e605bfc Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 5 Jun 2024 14:58:22 +0200 Subject: [PATCH 4/4] Change type in storage with index (cmap, gmap, lcc) --- .../include/CGAL/Combinatorial_map_storages_with_index.h | 2 +- .../include/CGAL/Generalized_map_storages_with_index.h | 2 +- .../include/CGAL/CMap_linear_cell_complex_storages_with_index.h | 2 +- .../include/CGAL/GMap_linear_cell_complex_storages_with_index.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 584442412c54..139c93c720f8 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h @@ -75,7 +75,7 @@ namespace CGAL { struct Container_for_attributes : public Compact_container_with_index, - Multiply_by_two_policy_for_cc_with_size<64>, size_type > + Multiply_by_two_policy_for_cc_with_size<64>, Index_type > {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type 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 828004b84164..ebb88cb0b3fd 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h @@ -75,7 +75,7 @@ namespace CGAL { struct Container_for_attributes : public Compact_container_with_index, - Multiply_by_two_policy_for_cc_with_size<64>, size_type > + Multiply_by_two_policy_for_cc_with_size<64>, Index_type > {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type 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 8417e20b2265..be93b3726f99 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 @@ -85,7 +85,7 @@ namespace CGAL { struct Container_for_attributes : public Compact_container_with_index, - Multiply_by_two_policy_for_cc_with_size<64>, size_type > + Multiply_by_two_policy_for_cc_with_size<64>, Index_type > {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type 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 27d58a7651af..7b17d0c389f6 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 @@ -85,7 +85,7 @@ namespace CGAL { struct Container_for_attributes : public Compact_container_with_index, - Multiply_by_two_policy_for_cc_with_size<64>, size_type > + Multiply_by_two_policy_for_cc_with_size<64>, Index_type > {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type