-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Milestone
Description
In PR #9274, I have added a value in Parallel_tag and Sequential_tag:
cgal/STL_Extension/include/CGAL/tags.h
Lines 45 to 47 in ced1371
| // For concurrency | |
| struct Sequential_tag { static constexpr bool is_parallel = false; }; | |
| struct Parallel_tag : public Sequential_tag { static constexpr bool is_parallel = true; }; |
That is the equivalent of Tag::value when Tag is a Boolean tag, like:
CGAL::Boolean_tag<B>(with the two specializationsCGAL::Tag_true/CGAL::Tag_false),std::boolean_constant<B>(with the two specializationsstd::true_type/std::false_type),- any specialization of a (UnaryTypeTrait)[https://en.cppreference.com/w/cpp/named_req/UnaryTypeTrait.html]
std::is_*something*<T>from<type_traits>
What do you think of that addition? Should we document it?
If it were me, Sequential_tag and Parallel_tag would have been enumerators, instead of tag types, but we have to deal with what was chosen at the time (even at the time of CGAL 4.3, when the base C++ standard for CGAL was C++03, enums were allowed as non-type template parameters).
Reactions are currently unavailable