CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.98k stars 1.39k forks source link

Boost & C++20 issue in Mesh_3 #4760

Closed matekelemen closed 4 years ago

matekelemen commented 4 years ago

Issue Details

Compiling example 3.3.1 3D Polyhedral Domains from 3D Mesh Generation fails due to the use of removed features in C++20 by boost::bimap. Specifically, this part in bimap_core.hpp:

typedef multi_index::multi_index_container
    <
        relation,
        core_indices,
        BOOST_DEDUCED_TYPENAME parameters::allocator::
            BOOST_NESTED_TEMPLATE rebind<relation>::other

    > core_type;

I haven't found a version of Boost that mentions c++20 support, so I'd appreciate any hints on how this could be solved. I'm aware that CGAL doesn't support C++20 yet, but this issue is similar to #4747 , for which a fix was already available.

Excluding the painful bits, here's the error message coming from Mesh_complex_3_in_triangulation_3.h:

/usr/include/boost/bimap/detail/bimap_core.hpp:410:7: error: no class template named ‘rebind’ in ‘boost::bimaps::detail::manage_additional_parameters<boost::bimaps::set_of_relation<>, boost::bimaps::with_info<int>, mpl_::na>::case_SHN::allocator’ {aka ‘class std::allocator<void>’}
  410 |     > core_type;
      |       ^~~~~~~~~

Environment

mglisse commented 4 years ago

Since you know the issue is in boost.bimap, why not head over there https://github.com/boostorg/bimap/issues/23 ?

matekelemen commented 4 years ago

Thanks for the link, I couldn't find any hint on them working on updates for new C++ standards before. Compiling boost from source solved every C++20 issue I had so far.