函式
<atomic>
std::atomic_load_explicit
template (1) | template <class T>T atomic_load_explicit (const volatile atomic<T>* obj, memory_order sync) noexcept;template <class T>T atomic_load_explicit (const atomic<T>* obj, memory_order sync) noexcept; |
---|
過載 (2) | T atomic_load_explicit (const volatile A* obj, memory_order sync) noexcept;T atomic_load_explicit (const A* obj, memory_order sync) noexcept; |
---|
Read contained value (explicit memory order)
引數
- obj
- 指向 atomic 物件的指標。
型別 A 代表其他過載的 *原子型別* (如果庫不實現 *C 風格原子型別* 作為 atomic 的例項)。
- sync
- 操作的同步模式。
This shall be one of the following values of the enum
type memory_order
返回值
包含的值。
T 是所包含值(atomic 的模板引數)的型別。
資料競爭
無資料競爭(原子操作)。記憶體順序由引數 sync 指定。