std:: is_execution_policy
From cppreference.net
C++
Algorithm library
|
헤더 파일에 정의됨
<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)
|
실행 정책 타입
(클래스) |
|
(C++17)
(C++17)
(C++17)
(C++20)
|
전역 실행 정책 객체
(상수) |