|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Provided only when T is an integral type other thancvbool or a pointer-to-object type | ||
value_type fetch_max( value_type arg, std::memory_order order= | (since C++26) | |
Atomically replaces the current value of the referenced object with the result ofstd::max of the value andarg. That is, it performs atomic maximum operation. The operation is a read-modify-write operation. Memory is affected according to the value oforder.
IfT is a pointer type and the pointers point to different complete objects (or subobjects thereof),pointer comparison does not establish astrict weak ordering.
This overload participates in overload resolution only ifstd::is_const_v<T> isfalse.
Contents |
| arg | - | the other argument ofstd::max |
| order | - | memory order constraints to enforce |
The value immediately preceding the effects of this function in themodification order of*this.
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_atomic_min_max | 202403L | (C++26) | Atomic minimum/maximum |
| This section is incomplete Reason: no example |