std::is_execution_policy
cppreference.net에서
| 헤더 <execution>
|
||
template< class T >
struct is_execution_policy;
|
(C++17부터)에 정의됨 | |
T이(가) 표준 또는 구현 정의 실행 정책 타입인지 확인합니다.
멤버 상수 value을(를) 제공하며, 이는 true과(와) 같습니다. 만약 T이(가) 표준 실행 정책 타입 또는 구현 정의 실행 정책 타입인 경우. 그렇지 않으면 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)
|
전역 실행 정책 객체
(상수) |