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

Atomically store a new value.

void store(
    weak_ptr<T> new_value,
    memory_order order = memory_order_seq_cst)
    noexcept;

Preconditions:

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

Effects:

Atomically store new_value in *this.

Throws:

Nothing.

Note:

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

Header

#include <experimental/atomic>

See Also