``atomic_store`` ================ .. role:: cpp(code) :language: cpp Defined in header ```` which is included from ```` Usage ----- .. code-block:: cpp atomic_store(&obj, desired); Atomically replaces the current value of ``obj`` with ``desired``. Description ----------- .. cpp:function:: template void atomic_store(T* ptr, std::type_identity_t val); Atomically writes ``val`` into ``*ptr``. ``{ *ptr = val; }`` :param ptr: address of the object whose value is to be replaced :param val: the value to store in the referenced object :returns: (nothing) See also -------- * `atomic_load `_: atomically obtains the value of the referenced object * `atomic_exchange `_: atomically replaces the value of the referenced object and obtains the value held previously