atomic::fetch_and Method

Performs a bitwise and on a value and an existing value that is stored in *this.

Ty atomic<Ty>::fetch_and (
   Ty Value,
   memory_order Order = memory_order_seq_cst
) volatile _NOEXCEPT;
Ty atomic<Ty>::fetch_and (
   Ty Value,
   memory_order Order = memory_order_seq_cst
) _NOEXCEPT;

Parameters

Return Value

A Ty object that contains the result of the bitwise and.

Remarks

The fetch_and method performs a read-modify-write operation to replace the stored value of *this with a bitwise and of Value and the current value that is stored in *this, within the memory constraints that are specified by Order.

Requirements

Header: atomic

Namespace: std

See Also

Reference

<atomic>

atomic Structure

atomic_fetch_and_explicit Function