public member type
<thread>
Thread id
成員函式
- id() noexcept; //預設建構函式
- 構造代表所有非可連線執行緒的 thread::id 值。
thread::id 物件是平凡可複製的。
非成員函式過載
- bool operator== (thread::id lhs, thread::id rhs) noexcept;
bool operator!= (thread::id lhs, thread::id rhs) noexcept;
bool operator< (thread::id lhs, thread::id rhs) noexcept;
bool operator<= (thread::id lhs, thread::id rhs) noexcept;
bool operator> (thread::id lhs, thread::id rhs) noexcept;
bool operator>= (thread::id lhs, thread::id rhs) noexcept;
- 兩個 thread::id 物件相等,當且僅當它們表示同一個可連線執行緒,或者它們都表示非可連線執行緒。
關係運算符建立的順序是實現定義的穩定全序,允許其用作關聯容器的鍵。
- template <class charT, class traits>
basic_ostream<charT, traits>& operator<< (basic_ostream<charT,traits>& os, thread::id id);
- 將 id 的文字表示形式(以實現特定的方式)插入到 os 中。
插入兩個相等比較的 thread::id 物件會生成相同的文字表示。插入不同的 thread::id 值會生成不同的表示。
非成員類特化
- template <class T> struct hash; //通用模板宣告
template<> struct hash<thread::id>;
- 一元函式物件類,定義了 hash 對 thread::id 型別物件的特化(參見 hash)。