Namespaces
Variants

std:: constructible_from

From ja.cppreference.net
ヘッダーで定義 <concepts>
template < class T, class ... Args >

concept constructible_from =

std:: destructible < T > && std:: is_constructible_v < T, Args... > ;
(C++20以降)

constructible_fromコンセプトは、型Tの変数が与えられた引数型のセットArgs...で初期化可能であることを指定します。

参考文献

  • C++23標準 (ISO/IEC 14882:2024):
  • 18.4.11 コンセプト constructible_from [concept.constructible]
  • C++20標準 (ISO/IEC 14882:2020):
  • 18.4.11 コンセプト constructible_from [concept.constructible]

関連項目

特定の引数に対するコンストラクタが型に存在するかチェックする
(クラステンプレート)