std::atomic_fetch_xor, std::atomic_fetch_xor_explicit
<atomic>
T atomic_fetch_xor( std::atomic <T>* obj,
T atomic_fetch_xor( volatile std::atomic <T>* obj,
T atomic_fetch_xor_explicit( std::atomic <T>* obj,
typename std::atomic <T>::value_type arg,
T atomic_fetch_xor_explicit( volatile std::atomic <T>* obj,
typename std::atomic <T>::value_type arg,
Atomically replaces the value pointed by obj with the result of bitwise XOR between the old value of obj and arg. Returns the value obj held previously.
The operation is performed as if the following is executed:
If std::atomic<T>
has no fetch_xor
member (this member is only provided for integral types except bool), the program is ill-formed.
[edit] Parameters
[edit] Return value
The value immediately preceding the effects of this function in the modification order of *obj.
[edit] Example
Reason: no example
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
P0558R1 | C++11 | exact type match was required becauseT was deduced from multiple arguments
|
T is only deducedfrom obj |
[edit] See also
(public member function of
std::atomic<T>
) [edit]
(function template) [edit]
(function template) [edit]