libunifex
libunifex copied to clipboard
Rename is_stop_never_possible to is_stop_ever_possible
The usage of this query quite often ends up needing to be negated which ends up with a double negative (not is stop never possible) instead of the positive form (is stop ever possible).
eg.
if constexpr (!is_stop_never_possible_v<StopToken>) {
// handle possibility of stop being requested
}
Inverting this and using the positive form would allow this code to read better:
if constexpr (is_stop_ever_possible_v<StopToken>) {
// handle possibility of stop being requested.
}
Hi Sir @lewissbaker . Can I work on this issue?
The current implementation does not work in MSVC. It also requires default constructability from a StopToken that can never be stopped, which is not required by the StopToken concept. For a possible fix of the first issue see: https://godbolt.org/z/z3d75or3M