std::experimental::negation
From cppreference.com
< cpp | experimental
| ヘッダ <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メタ関数 (クラステンプレート) |