Documentation Home >> Headers >> <thread> Header >> std::thread::id >> std::thread::id Equality Comparison Operator

Compare two instances of std::thread::id to see if they represent the same thread of execution.

bool operator==(
    std::thread::id lhs,std::thread::id rhs);

Returns:

true if both lhs and rhs represent the same thread of execution, or both have the singular not a thread value. false if lhs and rhs represent different threads of execution, or one represents a thread of execution and the other has the singular not a thread value.

Throws:

Nothing

Header

#include <thread>

See Also