名前空間
変種
操作

std::experimental::negation

From cppreference.com
 
 
 
 
ヘッダ <experimental/type_traits> で定義
template< class B >
struct negation;
(1) (Library 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;
(Library Fundamentals TS v2)

std::integral_constant から継承

メンバ定数

value
[static]
true は、B がメンバー ::value を持ち、かつ !bool(B::value)true である場合。それ以外の場合は false
(公開静的メンバ定数)

メンバ関数

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メタ関数
(クラステンプレート) [編集]
English 日本語 中文(简体) 中文(繁體)