-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
The standard defines execution policies like so:
class parallel_policy { /* unspecified */ };
inline constexpr parallel_policy par { /* unspecified */ };
Nothing guarantees that execution policies are movable, copyable, or default constructible, and portable code cannot assume they are, but, because they look so much like tag types (and indeed are tag types in all major implementations), users can very easily assume that they behave no different than true tag types like from_range_t
. To prevent users from making nonportable assumptions, we should make these types impossible to construct, copy, or move. libc++ and stdexec already do this, libstdc++ does not.
If we’re concerned about breaking users, we can do a gradual migration: keep the default constructors and special member functions, but mark them all [[deprecated]]
with a helpful message, and only = delete
them later.