|
|
Member functions | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
Constants | ||||
(C++17) | ||||
Specialized member functions | ||||
Specialized for integral, floating-point(C++20) and pointer types | ||||
Specialized for integral and pointer types only | ||||
(C++26) | ||||
atomic::fetch_min (C++26) | ||||
Specialized for integral types only | ||||
member only of atomic<Integral > specializations | ||
T fetch_min( T arg,std::memory_order order= std::memory_order_seq_cst)noexcept; | (1) | (since C++26) |
T fetch_min( T arg,std::memory_order order= std::memory_order_seq_cst)volatilenoexcept; | (2) | (since C++26) |
member only of atomic<T*> partial specialization | ||
T* fetch_min( T* arg,std::memory_order order= std::memory_order_seq_cst)noexcept; | (3) | (since C++26) |
T* fetch_min( T* arg,std::memory_order order= std::memory_order_seq_cst)volatilenoexcept; | (4) | (since C++26) |
Atomically replaces the current value with the result ofstd::min of the value andarg. That is, it performs atomic minimum operation. The operation is a read-modify-write operation. Memory is affected according to the value oforder.
It is deprecated ifstd::atomic<T>::is_always_lock_free isfalse and overload(2) or(4) participates in overload resolution.
Contents |
arg | - | the other argument ofstd::min |
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 |