Espacios de nombres
Variantes
Acciones

std::logical_not

De cppreference.com
< cpp‎ | utility‎ | functional
 
 
Biblioteca de servicios
 
Objetos función
Envoltorios de funciones
(C++11)
(C++11)
Aplicación parcial de funciones
(C++20)
(C++11)
Invocación de funciones
(C++17)(C++23)
Objeto función identidad
(C++20)
Envoltorios de referencias
(C++11)(C++11)
Envoltorios de operador transparentes
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
Negadores
(C++17)
Buscadores
Comparadores restringidos
Vinculadores y adaptadores antiguos
(hasta C++17)
(hasta C++17)
(hasta C++17)
(hasta C++17)
(hasta C++17)(hasta C++17)(hasta C++17)(hasta C++17)
(hasta C++20)
(hasta C++20)
(hasta C++17)(hasta C++17)
(hasta C++17)(hasta C++17)

(hasta C++17)
(hasta C++17)(hasta C++17)(hasta C++17)(hasta C++17)
(hasta C++20)
(hasta C++20)
 
Definido en el archivo de encabezado <functional>
template< class T >
struct logical_not;
Objeto de función para realizar lógico NOT (negación lógica). Efectivamente llama operator! para T tipo .
Original:
Function object for performing logical NOT (logical negation). Effectively calls operator! for type T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Tipos de miembros

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 bool
argument_type T

[editar] Las funciones miembro

operator()
devuelve el NO lógico del argumento
Original:
returns the logical NOT 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.

(función miembro pública)

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

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

Returns the logical NOT of arg.

Parameters

arg -
para calcular el valor lógico NOT de
Original:
value to compute logical NOT 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

bool operator()(const T &arg) const 
{
    return !arg;
}