std::atomic::fetch_add
Aus 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. |
<metanoindex/>
<tbody> </tbody> T fetch_add( T arg, memory_order = std::memory_order_seq_cst ); T fetch_add( T arg, memory_order = std::memory_order_seq_cst ) volatile; |
(Mitglied nur atomic<Integral> Template-Spezialisierung)(seit C++11) |
|
T* fetch_add( std::ptrdiff_t arg, memory_order = std::memory_order_seq_cst ); T* fetch_add( std::ptrdiff_t arg, memory_order = std::memory_order_seq_cst ) volatile; |
(Mitglied nur atomic<T*> Template-Spezialisierung)(seit C++11) |
|
Atomar ersetzt die aktuelle Wert mit dem Ergebnis von arithmetischen Addition des Wertes und
arg. Die Bedienung ist Lese-Modifizier-Schreib-Vorgang. Speichermodul gemäß dem Wert des betroffenen memory_order .Original:
Atomically replaces the current value with the result of arithmetic addition of the value and
arg. The operation is read-modify-write operation. Memory is affected according to the value of memory_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.
Für signierte
Integral Typen wird Arithmetik definiert Zweierkomplementdarstellung verwenden. ThereOriginal:
For signed
Integral types, arithmetic is defined to use two’s complement representation. ThereThe 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.
keine undefinierten Ergebnissen. Für
T* Typen, kann das Ergebnis eine undefinierte Adresse, aber die Operationen sonst keine undefinierten Verhalten .Original:
are no undefined results. For
T* types, the result may be an undefined address, but the operations otherwise have no undefined behavior.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.
Parameter
| arg | - | das andere Argument der Arithmetik hinaus
Original: the other argument of arithmetic addition The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| memory_order | - | Speicher, um Einschränkungen zu erzwingen
Original: memory order constraints to enforce The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Rückgabewert
Der Wert des atomaren Variable vor dem Anruf .
Original:
The value of the atomic variable before the call.
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.
Ausnahmen
Siehe auch
(C++11) (C++11) |
fügt eine nicht-elementare Wert einem atomaren Objekt und erhält den vorherigen Wert des atomaren Original: adds a non-atomic value to an atomic object 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. (Funktions-Template) |