Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::atomic_shared_ptr >> std::experimental::atomic_shared_ptr::load member function

Atomically load the current value of the std::experimental::atomic_shared_ptr instance.

shared_ptr<T> load(
    memory_order order = memory_order_seq_cst)
    const noexcept;

Preconditions:

The supplied order must be one of std::memory_order_relaxed, std::memory_order_acquire, std::memory_order_consume or std::memory_order_seq_cst

Effects:

Atomically loads the value stored in *this.

Returns:

The value stored in *this at the point of the call.

Throws:

Nothing.

Note:

This is an atomic load operation for the memory location comprising *this.

Header

#include <experimental/atomic>

See Also