Namespaces
Variants

std:: nontype, std:: nontype_t

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
( until C++17* ) ( until C++17* )
( until C++17* ) ( until C++17* )

( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until 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) 対応する std::nontype インスタンス (1) は、曖昧性除去引数タグであり、 std:: function_ref のコンストラクタに渡して、包含オブジェクトが定数テンプレートパラメータ V の値で構築されるべきであることを示すために使用できます。

テンプレートパラメータ

V - 構造体型の 定数テンプレートパラメータ

関連項目

任意の呼び出し可能オブジェクトの非所有ラッパー
(クラステンプレート)