Skip to content

Commit b3cb16c

Browse files
authored
Surface_mesh: remove obsolete g++4.4 workaround from SM_Halfedge_index (#9348)
Fixes #9319 #### Problem `pybind11::detail::is_move_constructible<CGAL::SM_Halfedge_index>` evaluates to `false` while `std::move_constructible<CGAL::SM_Halfedge_index>` correctly evaluates to `true`. This inconsistency prevents pybind11-based Python bindings from properly wrapping types that hold or use `SM_Halfedge_index`. #### Root Cause `SM_Halfedge_index` contained five `typedef void` members (`iterator_category`, `value_type`, `difference_type`, `pointer`, `reference`) added as a workaround for a g++ 4.4 ADL bug for `std::next`. pybind11 inspects `value_type` via legacy iterator_traits and, finding `void`, concludes the type is not a proper value type and marks it as not move-constructible. #### Fix CGAL 6.0 raised the minimum GCC requirement to 11.4, making the g++ 4.4 workaround unnecessary. Remove the five `typedef void` members and their explanatory comment. No code in the CGAL codebase references these typedefs.
2 parents 3302290 + 4acedf1 commit b3cb16c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,6 @@ namespace CGAL {
162162
{
163163
public:
164164

165-
// Workaround for a bug in g++4.4 in ADL for function next:
166-
// we provide the types needed for std::iterator_traits<Surface_mesh::halfedge_index>,
167-
// although this descriptor is not an iterator.
168-
typedef void iterator_category;
169-
typedef void value_type;
170-
typedef void difference_type;
171-
typedef void pointer;
172-
typedef void reference;
173-
174165
SM_Halfedge_index() : SM_Index<SM_Halfedge_index>((std::numeric_limits<size_type>::max)()) {}
175166

176167
explicit SM_Halfedge_index(size_type _idx) : SM_Index<SM_Halfedge_index>(_idx) {}

0 commit comments

Comments
 (0)