std::is_execution_policy
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Algorithm library 
 
 
 
 
 
 
 
  
 
  
 
 
 
  
 
 
 
 
 
 
 
  
  
  
 
  
 
  
 
  
 
  
 
 
 
 Constrained algorithms, e.g. ranges::copy, ranges::sort, ...
is_execution_policy
(C++17)  
(C++17)    (C++17)(C++17)(C++20)
(C++17)
(C++11)
(until C++17)(C++11)
(C++20)(C++20)
(C++17)
(C++17)
(C++17)
(C++17)
Defined in header 
 
 
<execution> 
 template< class T >
struct is_execution_policy;
 
 (since C++17) 
struct is_execution_policy;
Checks whether T is a standard or implementation-defined execution policy type.
Provides the member constant value which is equal to true, if T is a standard execution policy type, or an implementation-defined execution policy type. Otherwise, value is equal to false.
If the program adds specializations for std::is_execution_policy or std::is_execution_policy_v, the behavior is undefined.
Contents
[edit] Template parameters
 T
 -
 a type to check
[edit] Helper template
Defined in header 
 
 
<execution> 
 template< class T >
constexpr bool is_execution_policy_v = std::is_execution_policy<T>::value;
 
 (since C++17) 
constexpr bool is_execution_policy_v = std::is_execution_policy<T>::value;
Inherited from std::integral_constant
Member constants
value
[static]
T is a standard or implementation-defined execution policy type, false otherwise (public static member constant)
Member functions
operator bool
(public member function)
operator()
(C++14)
(public member function)
Member types
 Type
 Definition
value_type
 bool
type
 std::integral_constant <bool, value>
Run this code
#include <execution> static_assert(std::is_execution_policy_v<std::execution::unsequenced_policy >); static_assert(!std::is_execution_policy_v<int>); int main() {}