forked from boostorg/unordered
Add policy check that excludes unsequenced policies
It's technically UB for the callable in an unsequenced policy to acquire a lock so we add static_assert()s to catch potential user error.
This commit is contained in:
@@ -281,7 +281,7 @@ namespace {
|
||||
thread_runner(values, [&num_invokes, &x, threshold](boost::span<T> s) {
|
||||
(void)s;
|
||||
x.erase_if(
|
||||
std::execution::par_unseq, [&num_invokes, threshold](value_type& v) {
|
||||
std::execution::par, [&num_invokes, threshold](value_type& v) {
|
||||
++num_invokes;
|
||||
return v.second.x_ > threshold;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user