std::atomic_fetch_xor, std::atomic_fetch_xor_explicit
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <atomic>
|
||
| template< class Integral > Integral atomic_fetch_xor( std::atomic<Integral>* obj, Integral arg ); |
(1) | (C++11 起) |
| template< class Integral > Integral atomic_fetch_xor( volatile std::atomic<Integral>* obj, Integral arg ); |
(2) | (C++11 起) |
| template< class Integral > Integral atomic_fetch_xor_explicit( std::atomic<Integral>* obj, Integral arg, |
(3) | (C++11 起) |
| template< class Integral > Integral atomic_fetch_xor_explicit( volatile std::atomic<Integral>* obj, Integral arg, |
(4) | (C++11 起) |
原子取代的
3-4) arg岁之间的值按位异或的结果所指向的数值objarg,并返回值obj举行之前,如果由obj->fetch_and(arg)Original:
Atomically replaces the value pointed by
arg with the result of bitwise XOR between the old value of obj and arg, and returns the value obj held previously, as if by obj->fetch_and(arg)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
原子取代的
arg岁之间的值按位异或的结果所指向的数值objarg,并返回值obj举行之前,如果由obj->fetch_and(arg, order)Original:
Atomically replaces the value pointed by
arg with the result of bitwise XOR between the old value of obj and arg, and returns the value obj held previously, as if by obj->fetch_and(arg, order)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 参数
| obj | - | 指针的原子对象修改
Original: pointer to the atomic object to modify The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| arg | - | 值的原子对象中存储的值按位异或
Original: the value to bitwise XOR to the value stored in the atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| order | - | 的的内存sycnhronization订购此操作:所有的允许值.
Original: the memory sycnhronization ordering for this operation: all values are permitted. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
以前保存的值的原子对象所指向的
objOriginal:
The value held previously by the atomic object pointed to by
objThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 例外
[编辑] 可能的实现
template< class T > typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value, T>::type atomic_fetch_xor( std::atomic<T>* obj, T arg ); { return obj->fetch_xor(arg); } |
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| (C++11) |
以原子方式执行按位异或的原子对象之间的参数的值,并获得先前保存的值 Original: atomically performs bitwise XOR between the argument and the value of the atomic object and obtains the value held previously The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::atomic)
|
| (C++11) (C++11) |
取代的原子的对象的逻辑结果,或与非原子参数获得原子的先前的值 Original: replaces the atomic object with the result of logical OR with a non-atomic argument and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
取代的原子的对象与结果的逻辑AND(与),带的非原子参数和获得原子的先前的值 Original: replaces the atomic object with the result of logical AND with a non-atomic argument and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| C documentation for atomic_fetch_xor, atomic_fetch_xor_explicit
| |