名稱空間
變體
操作

std::nontype, std::nontype_t

來自 cppreference.com
< cpp‎ | 工具
 
 
 
函式物件
函式呼叫
(C++17)(C++23)
恆等函式物件
(C++20)
透明運算子包裝器
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)

舊繫結器和介面卡
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)  
(直到 C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(直到 C++20*)
(直到 C++20*)
(直到 C++17*)(直到 C++17*)
(直到 C++17*)(直到 C++17*)

(直到 C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(直到 C++20*)
(直到 C++20*)
 
在標頭檔案 <utility> 中定義
template< auto V >
struct nontype_t { explicit nontype_t() = default; };
(1) (C++26 起)
template< auto V >
constexpr std::nontype_t<V> nontype {};
(2) (C++26 起)
1) 類模板 std::nontype_t 可用於建構函式引數列表以匹配預期的標籤。
2) (1) 對應的 std::nontype 例項是一個消歧引數標籤,可以傳遞給 std::function_ref 的建構函式,以指示包含的物件應使用非型別模板引數 V 的值構造。

[編輯] 模板引數

V - 一個結構型別的非型別模板引數。

[編輯] 參閱

任何可呼叫物件的非擁有包裝器
(類模板) [編輯]