std::atomic_flag::test(3)
π std::atomic_flag::test(3) π
okay so hii bestie, welcome to this page from the C++ Standard Libary manual β it's literally about std::atomic_flag::test, and we're gonna make it make sense. no cap. π«Ά
πΈ NAME πΈ
std::atomic_flag::test β std::atomic_flag::test
β¨ Synopsis β¨
Here's the exact signature glow-up, bestie β keep the (1), (2), (since C++20), const volatile, const, and noexcept exactly where they are:
bool test( std::memory_order order =
std::memory_order_seq_cst ) const volatile
(1) (since C++20)
noexcept;
bool test( std::memory_order order =
(2) (since C++20)
std::memory_order_seq_cst ) const noexcept;
So yeah: it atomically reads the value of the *this and returns the value. That's the whole vibe. β
β οΈ warning bestie: iforderis one ofstd::memory_order_releaseandstd::memory_order_acq_rel, the behavior is undefined. not a drill. π
π Parameters π
orderβ the memory synchronization ordering
π Return value π
The value atomically read. periodt. π
π¦ Example π¦
This section is incomplete. Reason: no example.
(not me being sad about the missing example π)
π See also π
atomic_flag_testβ (C++20)atomic_flag_test_explicitβ atomically returns the value of the flag (C++20) (function)
the (C++20) tags and the (function) tag are all preserved above β iykyk π
π·οΈ Category π·οΈ
- Todo no example
signed off from http://cppreference.com, date/version 2024.06.10 β bye bestie, go read those atomics! πβ¨
π¦ 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