try to please AppleCLang 15

- ...by adding an explicit deduction guide.
  - and add -fexperimental-library (so that ranges::join is found).
This commit is contained in:
Laurent Rineau 2025-10-17 10:56:40 +02:00
parent 8746a29fa9
commit 940ac3d6e4
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,9 @@ include(CGAL_setup_tl-excepted)
add_library(CDT_3_dependencies INTERFACE)
target_compile_features(CDT_3_dependencies INTERFACE cxx_std_20)
target_link_libraries(CDT_3_dependencies INTERFACE CGAL::CGAL CGAL::Data CGAL::Eigen3_support tl::expected)
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
target_compile_options(CDT_3_dependencies INTERFACE -fexperimental-library)
endif()
create_single_source_cgal_program( "cdt_test_insert_constrained_edge_from_EDG_file.cpp")
target_link_libraries(cdt_test_insert_constrained_edge_from_EDG_file PRIVATE CDT_3_dependencies)

View File

@ -585,6 +585,11 @@ struct Mesh_property_maps {
VertexPointMap mesh_vertex_point_map;
};
// CTAD deduction guide
template<typename PatchIdMap, typename VertexSelectedMap, typename EdgeBorderMap, typename VertexPointMap>
Mesh_property_maps(PatchIdMap, VertexSelectedMap, EdgeBorderMap, VertexPointMap)
-> Mesh_property_maps<PatchIdMap, VertexSelectedMap, EdgeBorderMap, VertexPointMap>;
auto setup_mesh_property_maps(Mesh& mesh) {
auto [patch_id_map, patch_id_map_ok] = mesh.add_property_map<face_descriptor, int>("f:patch_id", -2);
assert(patch_id_map_ok); CGAL_USE(patch_id_map_ok);