std::experimental::negation
來自 cppreference.com
定義於標頭檔案 <experimental/type_traits> |
||
template< class B > struct negation; |
(1) | (庫基礎 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 [靜態] |
true 如果 B 擁有成員 ::value 使得 !bool(B::value) 為 true,否則為 false(public static 成員常量) |
成員函式
operator bool |
將物件轉換為 bool,返回 value (公開成員函式) |
operator() (C++14) |
返回 value (公開成員函式) |
成員型別
型別 | 定義 |
value_type
|
bool |
型別
|
std::integral_constant<bool, value> |
[編輯] 可能實現
template<class B> struct negation : std::integral_constant<bool, !bool(B::value)> {}; |
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 參見
(C++17) |
邏輯 NOT 元函式 (類模板) |