Namespaces
Variants

std::atomic_ref<T>:: load

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
value_type load ( std:: memory_order order =
std:: memory_order_seq_cst ) const noexcept ;
(C++26以降 constexpr)

参照先オブジェクトの現在値をアトミックに読み込み返却します。メモリへの影響は order の値に従って決定されます。

order std:: memory_order_relaxed std:: memory_order_consume std:: memory_order_acquire または std:: memory_order_seq_cst でない場合、動作は未定義です。

パラメータ

order - 強制するメモリ順序制約

戻り値

参照先オブジェクトの現在値。

関連項目

参照先オブジェクトから値をロードする
(公開メンバ関数)