次の方法で共有


<thread> operators

 

The latest version of this topic can be found at <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>