Share via


atomic_store Function

Atomically stores a value in an atomic object.

template <class Ty>
inline Ty atomic_store_explicit(
   const volatile atomic<Ty> *Atom,
   Ty Value
) _NOEXCEPT;
template <class Ty>
inline Ty atomic_store_explicit(
   const atomic<Ty> *Atom,
   _Ty Value
) _NOEXCEPT;

Parameters

  • Atom
    A pointer to an atomic object that contains a value of type Ty.

  • Value
    A value of type Ty.

Remarks

atomic_store stores Value in the object that is pointed to by Atom, within the memory_order_seq_cstmemory_order constraint.

Requirements

Header: atomic

Namespace: std

See Also

Reference

<atomic>

atomic Structure

atomic_store_explicit Function