std::chrono::duration::operator++, std::chrono::duration::operator--
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. |
duration& operator++(); |
(1) | |
duration operator++(int); |
(2) | |
duration& operator--(); |
(3) | |
duration operator--(int); |
(4) | |
Erhöht oder vermindert die Anzahl der Ticks für diese Dauer .
Original:
Increments or decrements the number of ticks for this duration.
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.
Wenn
rep_
ist Mitglied Variable, die die Anzahl der Ticks in einer Dauer Objekt Original:
If
rep_
is a member variable holding the number of ticks in a duration object, 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.
1)
Entspricht ++rep_; return *this;
Original:
Equivalent to ++rep_; return *this;
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.
2)
Entspricht return duration(rep_++)
Original:
Equivalent to return duration(rep_++)
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.
3)
Entspricht --rep_; return *this;
Original:
Equivalent to --rep_; return *this;
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.
4)
Entspricht return duration(rep_--);
Original:
Equivalent to return duration(rep_--);
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.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
(None)
Original:
(none)
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.
[Bearbeiten] Rückgabewert
@ 1,3 @ ein Verweis auf diese Dauer nach Änderung
Original:
@1,3@ a reference to this duration after modification
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.
@ 2,4 @ eine Kopie der Dauer vor vorgenommene Änderung
Original:
@2,4@ a copy of the duration made before modification
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.
[Bearbeiten] Beispiel
#include <chrono> #include <iostream> int main() { std::chrono::hours h(1); std::chrono::minutes m = ++h; m--; std::cout << m.count() << " minutes\n"; }
Output:
119 minutes
[Bearbeiten] Siehe auch
implementiert die kombinierten Zuweisungsoperator zwischen zwei Intervallen. (öffentliche Elementfunktion) | |
implementiert arithmetische Operationen mit Zeitintervallen als Argumente. (Funktions-Template) |