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
的值构造。
[编辑] 模板参数
[编辑] 参阅
|
任何可调用对象的非拥有包装器 (类模板) [编辑] |