cppreference.com
建立賬戶
登入
名稱空間
頁面
討論
變體
檢視
檢視
編輯
歷史
操作
std::atomic_ref<T>::
operator value_type
來自 cppreference.com
<
cpp
|
atomic
|
atomic ref
C++
編譯器支援
自由(freestanding)與宿主(hosted)
語言
標準庫
標準庫標頭檔案
具名要求
特性測試宏
(C++20)
語言支援庫
概念庫
(C++20)
診斷庫
記憶體管理庫
超程式設計庫
(C++11)
通用工具庫
容器庫
迭代器庫
範圍庫
(C++20)
演算法庫
字串庫
文字處理庫
數值庫
日期和時間庫
輸入/輸出庫
檔案系統庫
(C++17)
併發支援庫
(C++11)
執行控制庫
(C++26)
技術規範
符號索引
外部庫
[編輯]
併發支援庫
執行緒
執行緒
(C++11)
jthread
(C++20)
hardware_destructive_interference_size
hardware_constructive_interference_size
(C++17)
(C++17)
this_thread
名稱空間
get_id
(C++11)
yield
(C++11)
sleep_for
(C++11)
sleep_until
(C++11)
協同取消
stop_token
(C++20)
inplace_stop_token
(C++26)
never_stop_token
(C++26)
stop_source
(C++20)
inplace_stop_source
(C++26)
stop_callback
(C++20)
inplace_stop_callback
(C++26)
stop_callback_for_t
(C++26)
stoppable_token
(C++26)
unstoppable_token
(C++26)
stoppable-source
(C++26)
stoppable-callback-for
(C++26)
互斥
mutex
(C++11)
recursive_mutex
(C++11)
shared_mutex
(C++17)
timed_mutex
(C++11)
recursive_timed_mutex
(C++11)
shared_timed_mutex
(C++14)
通用鎖管理
lock
(C++11)
lock_guard
(C++11)
scoped_lock
(C++17)
unique_lock
(C++11)
shared_lock
(C++14)
once_flag
(C++11)
call_once
(C++11)
try_lock
(C++11)
defer_lock
try_to_lock
adopt_lock
defer_lock_t
try_to_lock_t
adopt_lock_t
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
條件變數
condition_variable
(C++11)
condition_variable_any
(C++11)
notify_all_at_thread_exit
(C++11)
cv_status
(C++11)
訊號量
counting_semaphore
binary_semaphore
(C++20)
(C++20)
門閂和屏障
latch
(C++20)
barrier
(C++20)
期值
promise
(C++11)
future
(C++11)
shared_future
(C++11)
packaged_task
(C++11)
async
(C++11)
launch
(C++11)
future_status
(C++11)
future_error
(C++11)
future_category
(C++11)
future_errc
(C++11)
安全回收
rcu_obj_base
(C++26)
rcu_domain
(C++26)
rcu_default_domain
(C++26)
rcu_synchronize
(C++26)
rcu_barrier
(C++26)
rcu_retire
(C++26)
危險指標
hazard_pointer_obj_base
(C++26)
hazard_pointer
(C++26)
make_hazard_pointer
(C++26)
原子型別
原子
(C++11)
atomic_ref
(C++20)
atomic_flag
(C++11)
原子型別的初始化
atomic_init
(C++11)
(C++20 中已棄用)
ATOMIC_VAR_INIT
(C++11)
(C++20 中已棄用)
ATOMIC_FLAG_INIT
(C++11)
記憶體排序
memory_order
(C++11)
kill_dependency
(C++11)
(C++26 中已棄用)
atomic_thread_fence
(C++11)
atomic_signal_fence
(C++11)
原子操作的自由函式
atomic_store
atomic_store_explicit
(C++11)
(C++11)
atomic_load
atomic_load_explicit
(C++11)
(C++11)
atomic_exchange
atomic_exchange_explicit
(C++11)
(C++11)
atomic_compare_exchange_weak
atomic_compare_exchange_weak_explicit
atomic_compare_exchange_strong
atomic_compare_exchange_strong_explicit
(C++11)
(C++11)
(C++11)
(C++11)
atomic_fetch_add
atomic_fetch_add_explicit
(C++11)
(C++11)
atomic_fetch_sub
atomic_fetch_sub_explicit
(C++11)
(C++11)
atomic_fetch_and
atomic_fetch_and_explicit
(C++11)
(C++11)
atomic_fetch_or
atomic_fetch_or_explicit
(C++11)
(C++11)
atomic_fetch_xor
atomic_fetch_xor_explicit
(C++11)
(C++11)
atomic_fetch_max
atomic_fetch_max_explicit
(C++26)
(C++26)
atomic_fetch_min
atomic_fetch_min_explicit
(C++26)
(C++26)
atomic_is_lock_free
(C++11)
atomic_wait
atomic_wait_explicit
(C++20)
(C++20)
atomic_notify_one
(C++20)
atomic_notify_all
(C++20)
原子標誌的自由函式
atomic_flag_test_and_set
atomic_flag_test_and_set_explicit
(C++11)
(C++11)
atomic_flag_clear
atomic_flag_clear_explicit
(C++11)
(C++11)
atomic_flag_test
atomic_flag_test_explicit
(C++20)
(C++20)
atomic_flag_wait
atomic_flag_wait_explicit
(C++20)
(C++20)
atomic_flag_notify_one
(C++20)
atomic_flag_notify_all
(C++20)
[編輯]
std::atomic_ref
成員函式
atomic_ref::atomic_ref
atomic_ref::operator=
atomic_ref::is_lock_free
atomic_ref::store
atomic_ref::load
atomic_ref::operator value_type
atomic_ref::exchange
atomic_ref::compare_exchange_strong
atomic_ref::compare_exchange_weak
atomic_ref::wait
atomic_ref::notify_one
atomic_ref::notify_all
atomic_ref::address
(C++26)
算術型別的操作
(除了
bool
和物件指標)
atomic_ref::fetch_add
atomic_ref::fetch_sub
atomic_ref::operator+=
atomic_ref::operator-=
整數型別的操作
(除了
bool
和物件指標)
atomic_ref::fetch_max
(C++26)
atomic_ref::fetch_min
(C++26)
atomic_ref::operator++
atomic_ref::operator++(int)
atomic_ref::operator--
atomic_ref::operator--(int)
整數型別的操作
(除了
bool
)
atomic_ref::fetch_and
atomic_ref::fetch_or
atomic_ref::fetch_xor
atomic_ref::operator&=
atomic_ref::operator|=
atomic_ref::operator^=
常量
atomic_ref::is_always_lock_free
atomic_ref::required_alignment
[編輯]
operator value_type
(
)
const
noexcept
;
(C++26 起為 constexpr)
等同於
return
load
(
)
;
。
[
編輯
]
返回值
如上所述。
[
編輯
]
參閱
load
原子地獲取所引用物件的值
(public member function)
[編輯]