std::atomic...s_lock_free(3)
π NAME π
okay so bestie, we're in the C++ Standard Libary manual π and the NAME is std::atomic::is_always_lock_free - std::atomic::is_always_lock_free (yes, literally twice, we stan a repetitive queen π
).
β¨ Synopsis β¨
This one is since C++17 β¨ Here's the whole static constant vibe:
static constexpr bool is_always_lock_free =
/*implementation-defined*/;
It equals true if this atomic type is always lock-free and false if it is never or sometimes lock-free. No cap.
The value of this constant is consistent with both the macro ATOMIC_xxx_LOCK_FREE, where defined, with the member function is_lock_free and non-member function std::atomic_is_lock_free.
π§ Notes π§
There is no non-member function equivalent of this static member constant because non-member functions take pointers to atomic types, and therefore aren't as useful in constant expressions. That's the whole reason, bestie β no mystery π«Ά.
Feature-test macro tea β:
- Feature-test macro:
__cpp_lib_atomic_is_always_lock_free - Value:
201603L - Std:
(C++17) - Feature:
constexpr atomic<T>::is_always_lock_free
π See also π
is_lock_freeβ checks if the atomic object is lock-free (public member function)atomic_is_lock_freeβ checks if the atomic type's operations are lock-free (C++11) (function template)
mwah π β this cutie came from http://cppreference.com, dated 2024.06.10.
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms