std::atomic_ref<T>:: is_always_lock_free
From cppreference.net
<
cpp
|
atomic
|
atomic ref
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::atomic_ref
| Member functions | ||||
|
(C++26)
|
||||
|
Operations for arithmetic types
(except
bool
and pointer-to-object)
|
||||
|
Operations for integral types
(except
bool
and pointer-to-object)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
Operations for integral types
(except
bool
)
|
||||
| Constants | ||||
|
atomic_ref::is_always_lock_free
|
||||
|
static
constexpr
bool
is_always_lock_free
=
/*implementation-defined*/
;
|
(自 C++20 起) | |
若此
atomic_ref
类型的操作始终为无锁操作,则等于
true
;若从未或无锁操作仅有时成立,则等于
false
。
该常量的值与成员函数 is_lock_free 的结果保持一致。
参见
检查
atomic_ref
对象是否无锁
(公开成员函数) |