Skip to content

Latest commit

 

History

History
207 lines (132 loc) · 3.88 KB

thread-operators.md

File metadata and controls

207 lines (132 loc) · 3.88 KB
description title ms.date f1_keywords ms.assetid helpviewer_keywords
Learn more about: <thread> operators
<thread> operators
11/04/2016
thread/std::operator!=
thread/std::operator>
thread/std::operator>=
thread/std::operator<
thread/std::operator<<
thread/std::operator<=
thread/std::operator==
e6bb6c0f-64f9-4cb2-9ff2-05b88a6ba7ac
std::operator!= (thread)
std::operator> (thread)
std::operator>= (thread)
std::operator< (thread)
std::operator<< (thread)
std::operator<= (thread)
std::operator== (thread)

<thread> operators

operator!=
operator>
operator>=
operator<
operator<<
operator<=
operator==

operator>=

Determines whether one thread::id object is greater than or equal to another.

bool operator>= (
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

!(Left < Right)

Remarks

This function does not throw any exceptions.

operator>

Determines whether one thread::id object is greater than another.

bool operator> (
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

Right < Left

Remarks

This function does not throw any exceptions.

operator<=

Determines whether one thread::id object is less than or equal to another.

bool operator<= (
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

!(Right < Left)

Remarks

This function does not throw any exceptions.

operator<

Determines whether one thread::id object is less than another.

bool operator<(
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

true if Left precedes Right in the total ordering; otherwise, false.

Remarks

The operator defines a total ordering on all thread::id objects. These objects can be used as keys in associative containers.

This function does not throw any exceptions.

operator!=

Compares two thread::id objects for inequality.

bool operator!= (
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

!(Left == Right)

Remarks

This function does not throw any exceptions.

operator==

Compares two thread::id objects for equality.

bool operator== (
    thread::id Left,
    thread::id Right) noexcept

Parameters

Left
The left thread::id object.

Right
The right thread::id object.

Return Value

true if the two objects represent the same thread of execution or if neither object represents a thread of execution; otherwise, false.

Remarks

This function does not throw any exceptions.

operator<<

Inserts a text representation of a thread::id object into a stream.

template <class Elem, class Tr>
basic_ostream<Elem, Tr>& operator<<(
    basic_ostream<Elem, Tr>& Ostr, thread::id Id);

Parameters

Ostr
A basic_ostream object.

Id
A thread::id object.

Return Value

Ostr.

Remarks

This function inserts Id into Ostr.

If two thread::id objects compare equal, the inserted text representations of those objects are the same.

See also

<thread>