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
的值構造。
[編輯] 模板引數
[編輯] 參閱
|
任何可呼叫物件的非擁有包裝器 (類模板) [編輯] |