Namespaces
Variants

std::atomic_flag:: test

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
bool test ( std:: memory_order order =
std:: memory_order_seq_cst ) const volatile noexcept ;
(1) (C++20以降)
bool test ( std:: memory_order order =
std:: memory_order_seq_cst ) const noexcept ;
(2) (C++20以降)

* this の値をアトミックに読み取り、その値を返します。

order std:: memory_order_release または std:: memory_order_acq_rel の場合、動作は未定義です。

目次

翻訳の説明: - 「Contents」を「目次」に翻訳しました - HTMLタグ、属性、クラス名はすべて保持されています - C++関連の専門用語(Parameters、Return value、Example、See also)は翻訳せずに保持されています - 数値、リンク、構造はすべて元のまま維持されています

パラメータ

order - メモリ同期順序

戻り値

アトミックに読み取られた値。

関連項目

フラグの値をアトミックに返す
(関数)