public member type
<thread>
Thread id
Member functions
- id() noexcept; //default constructor
- Constructs the thread::id value that represents all non-joinable threads.
thread::id objects are trivially copyable
Non-member function overloads
- 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;
- Two thread::id object compare equal if they represent the same joinable thread, or if they both represent non-joinable threads.
The order established by relational operators is an implementation-defined stable total order, allowing its use as keys for associative containers.
- template <class charT, class traits>
basic_ostream<chasrT, traits>& operator<< (basic_ostream<charT,traits>& os, thread::id id);
- Inserts a textual representation of id into os (in an implementation-specific manner).
Inserting two thread::id object that compare equal, generates the same textual representation. Inserting different thread::id values generates different representations.
Non-member class specializations
- template <class T> struct hash; //generic template declaration
template<> struct hash<thread::id>;
- Unary function object class that defines the specialization of hash for objects of type thread::id (see hash).