std::atomic_fetch_min, std::atomic_fetch_min_explicit
    <atomic> 
 T atomic_fetch_min( std::atomic <T>* obj,
T atomic_fetch_min( volatile std::atomic <T>* obj,
T atomic_fetch_min_explicit( std::atomic <T>* obj,
                             typename std::atomic <T>::value_type arg,
T atomic_fetch_min_explicit( volatile std::atomic <T>* obj,
                             typename std::atomic <T>::value_type arg,
Atomically replaces the value pointed by obj with the result of std::min between the old value of obj and arg. Returns the value obj held previously. The operation is performed as if the following was executed:
If std::atomic<T> has no fetch_min member (this member is only provided for integral and pointer types except bool), the program is ill-formed.
Contents
[edit] Parameters
[edit] Return value
The value immediately preceding the effects of this function in the modification order of *obj.
[edit] Notes
| Feature-test macro | Value | Std | Feature | 
|---|---|---|---|
| __cpp_lib_atomic_min_max | 202403L | (C++26) | Atomic minimum/maximum | 
[edit] Example
Reason: no example
[edit] See also
(public member function of
std::atomic<T>) [edit]