Namespaces
Variants

std::experimental:: negation

From cppreference.net
헤더 파일에 정의됨 <experimental/type_traits>
template < class B >
struct negation ;
(1) (라이브러리 fundamentals TS v2)

형식 특성 B 의 논리적 부정을 형성합니다.

타입 negation < B > UnaryTypeTrait 으로서 기본 특성이 std:: integral_constant < bool , ! bool ( B :: value ) > 입니다.

목차

템플릿 매개변수

B - bool ( B :: value ) 표현식이 유효한 상수 표현식이 되도록 하는 임의의 타입

헬퍼 변수 템플릿

template < class B >
constexpr bool negation_v = negation < B > :: value ;
(라이브러리 펀더멘털 TS v2)

std:: integral_constant 로부터 상속됨

멤버 상수

value
[static]
true 만약 B ::value 멤버를 가지고 있어서 ! bool ( B :: value ) true 인 경우, 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 >

가능한 구현

template<class B>
struct negation : std::integral_constant<bool, !bool(B::value)> {};

예제

참고 항목

(C++17)
논리적 NOT 메타함수
(클래스 템플릿)