function
<atomic>

atomic_is_lock_free

template (1)
template <class T> bool atomic_is_lock_free (const volatile atomic<T>* obj) noexcept;
template <class T> bool atomic_is_lock_free (const atomic<T>* obj) noexcept;
overloads (2)
bool atomic_is_lock_free (const volatile A* obj) noexcept;
bool atomic_is_lock_free (const A* obj) noexcept;
Is lock-free
Indicates whether obj is lock-free.

See atomic::is_lock_free for the equivalent member function of atomic.

Parameters

obj
Pointer to an atomic object.
Type A represents other overloaded atomic types (in case the library does not implement the C-style atomic types as instantiations of atomic).

Return value

true if the object is lock-free.
false otherwise.

Data races

No data races are initiated by calling this function.

Exception safety

No-throw guarantee: never throws exceptions.

See also