Espaços nominais
Variantes
Acções

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

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

 
 
Biblioteca de utilitários
Digite apoio (basic types, RTTI, type traits)
Gerenciamento de memória dinâmica
De tratamento de erros
Utilidades do programa
Variadic funções
Data e hora
Objetos de função
initializer_list(C++11)
bitset
hash(C++11)
Os operadores relacionais
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Pares e tuplas
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
Troque, avançar e avançar
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
 
std::chrono::duration
Funções de membro
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%=
Não-membros funções
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
Classes auxiliares
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)
Aumenta ou diminui o número de carrapatos durante este período.
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.
Se rep_ é uma variável que exerce o número de carrapatos em um objeto de duração
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)
Equivalente a ++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)
Equivalente a 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)
Equivalente a --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)
Equivalente a 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.

Índice

[editar] Parâmetros

(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

@ @ 1,3 uma referência a este período após a modificação
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 @ a cópia da duração feita antes da modificação
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.

[editar] Exemplo

#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

[editar] Veja também

implementa atribuição composto entre duas durações
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.

(função pública membro) [edit]
implementa operações aritméticas com durações como argumentos
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.

(modelo de função) [edit]