Namensräume
Varianten
Aktionen

std::chrono::duration::operator++, std::chrono::duration::operator--

Aus cppreference.com
< cpp‎ | chrono‎ | duration

 
 
 
 
std::chrono::duration
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
duration::duration
duration::operator=
duration::count
duration::zero
duration::min
duration::max
duration::operator+
duration::operator-
duration::operator++
duration::operator--
duration::operator+=
duration::operator-=
duration::operator*=
duration::operator/=
duration::operator%=
Non-Member-Funktionen
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
common_type
operator+
operator-
operator*
operator/
operator%
operator==
operator!=
operator<
operator<=
operator>
operator>=
duration_cast
Helper-Klassen
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
treat_as_floating_point
duration_values
 
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.
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.
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.
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.
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.
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.

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.

[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.
@ 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.

[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 Verbindung Zuordnung zwischen zwei Laufzeiten
Original:
implements compound assignment between two durations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(öffentliche Elementfunktion) [edit]
implementiert arithmetische Operationen mit Laufzeiten als Argumente
Original:
implements arithmetic operations with durations as arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktions-Template) [edit]