[[nodiscard]] bool joinable() const noexcept; // (1) C++20
bool joinable() const noexcept; // (1) C++26
概要
jthread
オブジェクトがスレッドと関連付けられているか否か取得する。
戻り値
例外
送出しない。
例
出力
バージョン
言語
- C++20
処理系
- Clang:
- GCC: 10.2.0 ✅
- Visual C++: ??
参照
- P2422R1 Remove
nodiscard
annotations from the standard library specification- C++26で
[[nodiscard]]
指定が削除された
- C++26で