| Constrained algorithms and algorithms on ranges(C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constrained algorithms, e.g.ranges::copy,ranges::sort, ... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Execution policies(C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operations on uninitialized memory | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <execution> | ||
template<class T> struct is_execution_policy; | (since C++17) | |
Checks whetherT is a standard or implementation-defined execution policy type.
Provides the member constantvalue which is equal totrue, ifT isa standard execution policy type, or an implementation-defined execution policy type. Otherwise,value is equal tofalse.
If the program adds specializations forstd::is_execution_policy orstd::is_execution_policy_v, the behavior is undefined.
Contents |
| T | - | a type to check |
Defined in header <execution> | ||
template<class T> constexprbool is_execution_policy_v= std::is_execution_policy<T>::value; | (since C++17) | |
value [static] | true ifT is a standard or implementation-defined execution policy type,false otherwise(public static member constant) |
operator bool | converts the object tobool, returnsvalue (public member function) |
operator() (C++14) | returnsvalue (public member function) |
| Type | Definition |
value_type | bool |
type | std::integral_constant<bool, value> |
#include <execution> static_assert(std::is_execution_policy_v<std::execution::unsequenced_policy>);static_assert(!std::is_execution_policy_v<int>); int main(){}
(C++17)(C++17)(C++17)(C++20) | execution policy types (class)[edit] |
(C++17)(C++17)(C++17)(C++20) | global execution policy objects (constant)[edit] |