atomic_exchange_explicit Function

Replaces the stored value of Atom with Value.

template <class Ty>
inline Ty atomic_exchange_explicit(
   volatile atomic<Ty> *Atom,
   Ty Value,
   memory_order Order
) _NOEXCEPT;
template <class Ty>
inline Ty atomic_exchange_explicit(
   atomic<Ty> *Atom,
   Ty Value,
   memory_order Order
) _NOEXCEPT;

Atom

A pointer to an atomic object that stores a value of type Ty.

Value

A value of type Ty.

Order

A memory_order.

The stored value of Atom before the exchange.

The atomic_exchange_explicit function performs a read-modify-write operation to exchange the value that is stored in Atom with Value, within the memory constraints that are specified by Order.

Header: atomic

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft