operator==,!=,<,<=,>,>=,<=>(std::thread::id)
提供: cppreference.com
<tbody>
</tbody>
bool operator==( thread::id lhs, thread::id rhs ) noexcept; |
(1) | (C++11以上) |
bool operator!=( thread::id lhs, thread::id rhs ) noexcept; |
(2) | (C++11以上) (C++20未満) |
bool operator<( thread::id lhs, thread::id rhs ) noexcept; |
(3) | (C++11以上) (C++20未満) |
bool operator<=( thread::id lhs, thread::id rhs ) noexcept; |
(4) | (C++11以上) (C++20未満) |
bool operator>( thread::id lhs, thread::id rhs ) noexcept; |
(5) | (C++11以上) (C++20未満) |
bool operator>=( thread::id lhs, thread::id rhs ) noexcept; |
(6) | (C++11以上) (C++20未満) |
std::strong_ordering operator<=>( thread::id lhs, thread::id rhs ) noexcept; |
(7) | (C++20以上) |
2つのスレッド識別子を比較します。
1-2)
lhs と rhs が同じスレッドを表す (またはどちらもスレッドを表さない) かどうか調べます。3-7) 未規定の全順序で
lhs と rhs を比較します。引数
| lhs, rhs | - | 比較するスレッド識別子 |
戻り値
1-6) 対応する関係が成立する場合は
true、そうでなければ false。7) 全順序で
lhs が rhs より小さければ std::strong_ordering::less、そうでなく rhs が lhs より小さければ std::strong_ordering::greater、そうでなければ std::strong_ordering::equal。計算量
定数。
関連項目
thrd_equal の C言語リファレンス
|