From 373deccfb63f7be7d9d88d085bc92c9949668980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 29 Jun 2022 10:36:34 +0200 Subject: [PATCH] constexpr function requires even parameters to be LiteralType --- .../CGAL/Polygon_mesh_processing/connected_components.h | 2 +- .../Polygon_mesh_processing/internal/Corefinement/Visitor.h | 4 ++-- .../internal/Corefinement/face_graph_utils.h | 2 +- .../CGAL/Polygon_mesh_processing/repair_degeneracies.h | 4 ++-- .../Polygon_mesh_processing/repair_self_intersections.h | 6 +++--- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- .../Polygon_mesh_processing/test_remove_caps_needles.cpp | 2 +- Property_map/include/CGAL/property_map.h | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h index 41ae5369f82..1b0b7e2e791 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -59,7 +59,7 @@ namespace internal { // A property map template struct No_constraint { - friend constexpr bool get(No_constraint, typename boost::graph_traits::edge_descriptor) + friend bool get(No_constraint, typename boost::graph_traits::edge_descriptor) { return false; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index e7ad2933114..67752269ab2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -75,8 +75,8 @@ struct Ecm_bind, No_mark > No_mark ecm1, ecm2; Ecm_bind(G&, G&, const No_mark&, const No_mark&){} typedef typename boost::graph_traits::edge_descriptor edge_descriptor; - constexpr void call_put(G&, edge_descriptor, bool) const {} - constexpr bool call_get(G&, edge_descriptor) const { + void call_put(G&, edge_descriptor, bool) const {} + bool call_get(G&, edge_descriptor) const { return false; } }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 6f8d0d41857..1c2b6de4581 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -35,7 +35,7 @@ enum Boolean_operation_type {UNION = 0, INTERSECTION, template struct No_mark { - friend constexpr + friend bool get(No_mark, typename boost::graph_traits::edge_descriptor) { diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 45860f82abf..7edb6fca279 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -530,8 +530,8 @@ struct Filter_wrapper_for_cap_needle_removal >&) const { return true; } - constexpr bool operator()(const TriangleMesh&) const { return true; } + bool operator()(const std::vector >&) const { return true; } + bool operator()(const TriangleMesh&) const { return true; } }; Return_true cc_envelope; @@ -2391,7 +2391,7 @@ bool remove_self_intersections(const FaceRange& face_range, struct Return_false { - constexpr bool operator()(std::pair) const { return false; } + bool operator()(std::pair) const { return false; } }; typedef typename internal_np::Lookup_named_param_def < diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index fdea713d90e..71351e37125 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -618,7 +618,7 @@ bool use_dt3 = { struct Always_valid { - constexpr bool operator()(const std::vector&, int,int,int) const { return true; } + bool operator()(const std::vector&, int,int,int) const { return true; } }; Always_valid is_valid; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp index 106766e5754..b57a3dc8e8d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_remove_caps_needles.cpp @@ -66,7 +66,7 @@ void test_with_envelope(std::string filename, double eps) // first a test where nothing should be done struct No_modification_allowed { - constexpr bool operator()(K::Point_3, K::Point_3, K::Point_3) const { return false; } + bool operator()(K::Point_3, K::Point_3, K::Point_3) const { return false; } }; No_modification_allowed no_modif; const std::size_t nbv = vertices(mesh).size(); diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index 0f442e285a0..302b194a5e9 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -46,14 +46,14 @@ struct Static_boolean_property_map typedef bool reference; typedef boost::read_write_property_map_tag category; - inline friend constexpr + inline friend value_type get(Static_boolean_property_map, const key_type&) { return default_value; } - inline friend constexpr + inline friend void put(Static_boolean_property_map, const key_type&, value_type) {}