##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# operator==,!=,<,<=,>,>=(std::thread::id)

From cppreference.com
< cpp‎ | thread‎ | thread‎ | id

bool operator==( thread::id lhs, thread::id rhs ); | (1) | (since C++11)
bool operator!=( thread::id lhs, thread::id rhs ); | (2) | (since C++11)
bool operator<( thread::id lhs, thread::id rhs ); | (3) | (since C++11)
bool operator<=( thread::id lhs, thread::id rhs ); | (4) | (since C++11)
bool operator>( thread::id lhs, thread::id rhs ); | (5) | (since C++11)
bool operator>=( thread::id lhs, thread::id rhs ); | (6) | (since C++11)

Compares two thread identifiers.

1-2) Checks whether `lhs` and `rhs` represent either the same thread, or no thread.
3-6) Compares `lhs` and `rhs` in such a way, that `lhs` and `rhs` are totally ordered.

### [edit] Parameters

lhs, rhs | - | thread identifiers to compare

### [edit] Return value

true whether the corresponding relation holds, `false` otherwise.

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Complexity

Constant.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/thread/thread/id/operator_cmp&oldid=62984"