名稱空間
變體
操作

std::constructible_from

來自 cppreference.com
 
 
 
定義於標頭檔案 <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]

[編輯] 參閱

檢查型別是否具有針對特定引數的建構函式
(類模板) [編輯]