Namespaces
Variants
Views
Actions

std::atomic::fetch_or

From cppreference.com
< cpp‎ | atomic‎ | atomic
Revision as of 17:49, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
 

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
T fetch_or( T arg,

             memory_order = std::memory_order_seq_cst );
T fetch_or( T arg,

             memory_order = std::memory_order_seq_cst ) volatile;
</td>

<td class="t-dcl-nopad"> </td> <td > (member only of atomic<Integral> template specialization)
(since C++11) </td> </tr> Template:ddcl list end

Atomically replaces the current value with the result of bitwise OR of the value and arg. The operation is read-modify-write operation. Memory is affected according to the value of memory_order.

Contents

Parameters

arg - the other argument of bitwise OR
memory_order - memory order constraints to enforce

Return value

The value of the atomic variable before the call.

Exceptions

noexcept specification:  
noexcept
  

See also

Template:cpp/atomic/dcl list atomic fetch or