std::destructible
來自 cppreference.com
< cpp | 概念 (concepts)
定義於標頭檔案 <concepts> |
||
template< class T > concept destructible = std::is_nothrow_destructible_v<T>; |
(C++20 起) | |
概念 destructible
指定了所有其例項能在其生命週期結束時安全銷燬的型別(包括引用型別)的概念。
[編輯] 注意
與Destructible 命名要求不同,std::destructible
要求解構函式為 noexcept(true),而不僅僅是呼叫時不會丟擲異常,並允許引用型別和陣列型別。
[編輯] 參考
- C++23 標準 (ISO/IEC 14882:2024)
- 18.4.10 概念
destructible
[concept.destructible]
- 18.4.10 概念
- C++20 標準 (ISO/IEC 14882:2020)
- 18.4.10 概念
destructible
[concept.destructible]
- 18.4.10 概念
[編輯] 另請參閱
檢查型別是否具有非刪除的解構函式 (類模板) |