Compare two instances of std::thread::id to see if one lies before
the other in the total ordering of thread ID values.
bool operator<( std::thread::id lhs,std::thread::id rhs);
- Returns:
trueif the value oflhsoccurs before the value ofrhsin the total ordering of thread ID values. Iflhs!=rhsthen exactly one oflhs<rhsorrhs<lhsreturnstrueand the other returnsfalse. Iflhs==rhsthenlhs<rhsandrhs<lhsboth returnfalse.- Throws:
Nothing
- Note:
The singular not a thread value held by a default-constructed
std::thread::idinstance compares less than anystd::thread::idinstance that represents a thread of execution. If two instances ofstd::thread::idare equal, neither is less than the other. Any set of distinctstd::thread::idvalues forms a total order which is consistent throughout an execution of a program. This order may vary between executions of the same program.
#include <thread>