Espaços nominais
Variantes
Acções

std::negate

Da cppreference.com
< cpp‎ | utility‎ | functional

 
 
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
(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.
(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.
(C++11)
(C++11)
(C++11)
 
Objetos de função


Invólucros de função
Original:
Function wrappers
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)
Ligar
Original:
Bind
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
Invólucros de referência
Original:
Reference wrappers
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)
Invólucros operador
Original:
Operator wrappers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Negadores
Original:
Negators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Obsoleta ligantes e adaptadores
Original:
Deprecated binders and adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleta)
(obsoleta)
(obsoleta)
(obsoleta)
(obsoleta)(obsoleta)(obsoleta)(obsoleta)
(obsoleta)
(obsoleta)(obsoleta)
(obsoleta)(obsoleta)
 
Definido no cabeçalho <functional>
template< class T >
struct negate;
Objeto de função para a realização de negação. Efetivamente chama operator- em uma instância de T tipo.
Original:
Function object for performing negation. Effectively calls operator- on an instance of type T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Tipos de membro

Tipo
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
result_type T
argument_type T

[editar] Funções de membro

operator()
retorna a negação do argumento
Original:
returns the negation of the argument
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)

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

T operator()( const T& arg ) const;

Returns the negation of arg.

Parameters

arg -
para calcular o valor de negação
Original:
value to compute negation of
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Return value

The result of -arg.

Exceptions

(none)

Possible implementation

T operator()(const T &arg) const 
{
    return -arg;
}