constexpr function requires even parameters to be LiteralType

This commit is contained in:
Sébastien Loriot 2022-06-29 10:36:34 +02:00
parent 678b9d8148
commit 373deccfb6
8 changed files with 13 additions and 13 deletions

View File

@ -59,7 +59,7 @@ namespace internal {
// A property map
template <typename G>
struct No_constraint {
friend constexpr bool get(No_constraint<G>, typename boost::graph_traits<G>::edge_descriptor)
friend bool get(No_constraint<G>, typename boost::graph_traits<G>::edge_descriptor)
{
return false;
}

View File

@ -75,8 +75,8 @@ struct Ecm_bind<G, No_mark<G>, No_mark<G> >
No_mark<G> ecm1, ecm2;
Ecm_bind(G&, G&, const No_mark<G>&, const No_mark<G>&){}
typedef typename boost::graph_traits<G>::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;
}
};

View File

@ -35,7 +35,7 @@ enum Boolean_operation_type {UNION = 0, INTERSECTION,
template <typename G>
struct No_mark
{
friend constexpr
friend
bool get(No_mark<G>,
typename boost::graph_traits<G>::edge_descriptor)
{

View File

@ -530,8 +530,8 @@ struct Filter_wrapper_for_cap_needle_removal<TriangleMesh, VPM, Traits, Identity
typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor;
typedef typename Graph_traits::edge_descriptor edge_descriptor;
constexpr bool flip(halfedge_descriptor){ return true; }
constexpr bool collapse(edge_descriptor){ return true; }
bool flip(halfedge_descriptor){ return true; }
bool collapse(edge_descriptor){ return true; }
};
} // namespace internal

View File

@ -2161,8 +2161,8 @@ remove_self_intersections_one_step(std::set<typename boost::graph_traits<Triangl
struct Return_true
{
constexpr bool is_empty() const { return true; }
constexpr bool operator()(const std::vector<std::vector<typename GeomTraits::Point_3> >&) const { return true; }
constexpr bool operator()(const TriangleMesh&) const { return true; }
bool operator()(const std::vector<std::vector<typename GeomTraits::Point_3> >&) 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<face_descriptor, face_descriptor>) const { return false; }
bool operator()(std::pair<face_descriptor, face_descriptor>) const { return false; }
};
typedef typename internal_np::Lookup_named_param_def <

View File

@ -618,7 +618,7 @@ bool use_dt3 =
{
struct Always_valid
{
constexpr bool operator()(const std::vector<Point>&, int,int,int) const { return true; }
bool operator()(const std::vector<Point>&, int,int,int) const { return true; }
};
Always_valid is_valid;

View File

@ -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();

View File

@ -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)
{}