|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <atomic> | ||
bool atomic_flag_test(constvolatilestd::atomic_flag* object)noexcept; | (1) | (since C++20) |
bool atomic_flag_test(conststd::atomic_flag* object)noexcept; | (2) | (since C++20) |
bool atomic_flag_test_explicit(constvolatilestd::atomic_flag* object, std::memory_order order)noexcept; | (3) | (since C++20) |
bool atomic_flag_test_explicit(conststd::atomic_flag* object, std::memory_order order)noexcept; | (4) | (since C++20) |
Atomically reads the value of the*object and returns the value.
Contents |
| object | - | pointer to theatomic_flag object to read |
| order | - | the memory synchronization ordering |
The value atomically read.
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_atomic_flag_test | 201907L | (C++20) | std::atomic_flag::test |
| This section is incomplete Reason: no example |
(C++20) | atomically returns the value of the flag (public member function of std::atomic_flag)[edit] |