``atomic_load`` =============== .. role:: cpp(code) :language: cpp Defined in header ```` which is included from ```` Usage ----- .. code-block:: cpp auto current = atomic_load(&obj); Atomically obtains the current value of ``obj``. Description ----------- .. cpp:function:: template T atomic_load(T* ptr); Atomically reads the content of ``*ptr`` and returns it. ``{ T val = *ptr; return val; }`` :param ptr: address of the object whose current value is to be returned :returns: the value that is held by the object pointed to by ``ptr`` See also -------- * `atomic_store `_: atomically replaces the value of the referenced object with a non-atomic argument * `atomic_exchange `_: atomically replaces the value of the referenced object and obtains the value held previously