Cpp-standard-library-cpp-atomic-fetch-xor

提供:Dev Guides
移動先:案内検索

C ++アトミックライブラリ-Fetch Xor

説明

アトミックオブジェクトを非アトミック引数を持つ論理XORの結果に置き換え、アトミックの前の値を取得します。

宣言

以下は、std
atomic_fetch_xorの宣言です。
template< class Integral >
Integral atomic_fetch_xor( volatile std::atomic<Integral>* obj, Integral arg );

C 11

template< class Integral >
Integral atomic_fetch_xor( std::atomic<Integral>* obj, Integral arg );
以下は、std
atomic_fetch_xor_explicitの宣言です。
template< class Integral >
Integral atomic_fetch_xor_explicit( std::atomic<Integral>* obj, Integral arg,
                                    std::memory_order order );

C 11

template< class Integral >
Integral atomic_fetch_xor_explicit( volatile std::atomic<Integral>* obj, Integral arg,
                                    std::memory_order order );

パラメーター

  • obj -変更するアトミックオブジェクトへのポインタで使用されます。
  • desr -値をアトミックオブジェクトに格納するために使用されます。
  • order -この操作のメモリ順序を同期するために使用されます。

戻り値

この関数の効果の直前の値を* objの変更順で返します。

例外

*No-noexcept* -このメンバー関数は例外をスローしません。