Namespaces
Variants

std:: is_execution_policy

From cppreference.net
Algorithm library
Constrained algorithms and algorithms on ranges (C++20)
Constrained algorithms, e.g. ranges::copy , ranges::sort , ...
Execution policies (C++17)
is_execution_policy
(C++17)
Non-modifying sequence operations
Batch operations
(C++17)
Search operations
Modifying sequence operations
Copy operations
(C++11)
(C++11)
Swap operations
Transformation operations
Generation operations
Removing operations
Order-changing operations
(until C++17) (C++11)
(C++20) (C++20)
Sampling operations
(C++17)

Sorting and related operations
Partitioning operations
Sorting operations
Binary search operations
(on partitioned ranges)
Set operations (on sorted ranges)
Merge operations (on sorted ranges)
Heap operations
Minimum/maximum operations
Lexicographical comparison operations
Permutation operations
C library
Numeric operations
Operations on uninitialized memory
헤더 파일에 정의됨 <execution>
template < class T >
struct is_execution_policy ;
(C++17부터)

T 가 표준 또는 구현체 정의 실행 정책(execution policy) 타입인지 확인합니다.

멤버 상수 value 를 제공합니다. T 표준 실행 정책 타입 이거나 구현에서 정의된 실행 정책 타입인 경우, 이 상수는 true 와 같습니다. 그렇지 않은 경우, value false 와 같습니다.

프로그램이 std::is_execution_policy 또는 std::is_execution_policy_v 에 대한 특수화를 추가하는 경우, 그 동작은 정의되지 않습니다.

목차

템플릿 매개변수

T - 확인할 타입

헬퍼 템플릿

헤더에 정의됨 <execution>
template < class T >
constexpr bool is_execution_policy_v = std :: is_execution_policy < T > :: value ;
(C++17부터)

std::integral_constant에서 상속됨

멤버 상수

value
[static]
true 만약 T 가 표준 또는 구현 정의 실행 정책 타입인 경우, false 그렇지 않은 경우
(public static member constant)

멤버 함수

operator bool
객체를 bool 로 변환, value 반환
(public member function)
operator()
(C++14)
value 반환
(public member function)

멤버 타입

타입 정의
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)
전역 실행 정책 객체
(상수)