Espacios de nombres
Variantes
Acciones

Comparison operators

De cppreference.com
< cpp‎ | language

 
 
Lenguaje C++
Los temas generales
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Control de flujo
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sentencias condicionales ejecución
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Instrucciones de iteración
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ir declaraciones
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaración de la función
lambda declaración de la función
función de plantilla
especificador inline
especificaciones de excepción (obsoleto)
noexcept especificador (C++11)
Excepciones
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los espacios de nombres
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Los especificadores
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv especificadores
almacenamiento duración especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialización
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los literales
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expresiones
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representaciones alternativas
Utilidades
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
alias de tipo de declaración (C++11)
atributos (C++11)
Lanza
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversiones implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-cast estilo y funcional
De asignación de memoria
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clases
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clase propiedades específicas de la función
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funciones especiales miembro
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Plantillas
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clase de plantilla
función de plantilla
plantilla de especialización
paquetes de parámetros (C++11)
Varios
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaje en línea
 
Compara los argumentos .
Original:
Compares the arguments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operator name Syntax Over​load​able Prototype examples (for class T)
Inside class definition Outside class definition
equal to a == b Yes bool T::operator ==(const T2 &b) const; bool operator ==(const T &a, const T2 &b);
not equal to a != b Yes bool T::operator !=(const T2 &b) const; bool operator !=(const T &a, const T2 &b);
less than a < b Yes bool T::operator <(const T2 &b) const; bool operator <(const T &a, const T2 &b);
greater than a > b Yes bool T::operator >(const T2 &b) const; bool operator >(const T &a, const T2 &b);
less than or equal to a <= b Yes bool T::operator <=(const T2 &b) const; bool operator <=(const T &a, const T2 &b);
greater than or equal to a >= b Yes bool T::operator >=(const T2 &b) const; bool operator >=(const T &a, const T2 &b);
'Notas'
Original:
Notes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Todos incorporado bool retorno operadores, y la mayoría de las sobrecargas definidas por el usuario también volver bool manera que los operadores definidos por el usuario se pueden utilizar de la misma manera como la ins incorporado. Sin embargo, en una definida por el usuario sobrecarga del operador, cualquier tipo puede ser utilizado como tipo de retorno (incluyendo void) .
    Original:
    All built-in operators return bool, and most user-defined overloads also return bool so that the user-defined operators can be used in the same manner as the built-ins. However, in a user-defined operator overload, any type can be used as return type (including void).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • T2 puede ser cualquier tipo incluyendo T
    Original:
    T2 can be any type including 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] Explicación

Devuelve el resultado booleano de la comparación de los valores de los argumentos, que no son modificados .
Original:
Returns the boolean result of comparison of the values of the arguments, which are not modified.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Los operadores aritméticos de comparación

Por cada par de tipos aritméticos promovidas L y R, incluyendo los tipos de enumeración, las firmas de función siguientes participar en la resolución de sobrecarga:
Original:
For every pair of promoted arithmetic types L and R, including enumeration types, the following function signatures participate in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bool operator<(L, R);
bool operator>(L, R);
bool operator<=(L, R);
bool operator>=(L, R);
bool operator==(L, R);
bool operator!=(L, R);
Si los operandos tiene la aritmética o la enumeración de tipo (sin ámbito o ámbito), las conversiones aritméticas habituales' se llevan a cabo siguiendo las reglas de operadores aritméticos. Los valores se comparan después de conversiones:
Original:
If the operands has arithmetic or enumeration type (scoped or unscoped), usual arithmetic conversions are performed following the rules for operadores aritméticos. The values are compared after conversions:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

#include <iostream>
int main()
{
    std::cout << std::boolalpha;
    int n = -1;
 
    int n2 = 1;
    std::cout << " -1 == 1? " << (n == n2) << '\n'
              << "Comparing two signed values:\n"
              << " -1  < 1? " << (n < n2) << '\n'
              << " -1  > 1? " << (n > n2) << '\n';
 
    unsigned int u = 1;
    std::cout << "Comparing signed and unsigned:\n"
              << " -1  < 1? " << (n < u) << '\n'
              << " -1  > 1? " << (n > u) << '\n';
 
    unsigned char uc = 1;
    std::cout << "Comparing signed and smaller unsigned:\n"
              << " -1  < 1? " << (n < uc) << '\n'
              << " -1  > 1? " << (n > uc) << '\n';
}

Output:

-1 == 1? false
Comparing two signed values:
 -1  < 1? true
 -1  > 1? false
Comparing signed and unsigned:
 -1  < 1? false
 -1  > 1? true
Comparing signed and smaller unsigned:
 -1  < 1? true
 -1  > 1? false

[editar] Operadores de puntero de comparación

Por cada P tipo que puede ser objeto o puntero a puntero a función o std::nullptr_t, y para cada tipo MP que es un puntero al objeto miembro o un puntero a una función miembro, las firmas de función siguientes participar en la resolución de sobrecarga:
Original:
For every type P which is either pointer to object or pointer to function or std::nullptr_t, and for every type MP that is a pointer to member object or pointer to member function, the following function signatures participate in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bool operator<(P, P);
bool operator>(P, P);
bool operator<=(P, P);
bool operator>=(P, P);
bool operator==(P, P);
bool operator!=(P, P);
bool operator==(MP, MP);
bool operator!=(MP, MP);
Los operadores de comparación se puede usar para comparar dos punteros (o punteros-a-miembros, por operator== y operator!= solamente), o un puntero y un puntero nulo constante, o dos constantes de puntero nulo (pero sólo mientras al menos uno de ellos es std::nullptr_t: comparación de NULL NULL y sigue las reglas de la aritmética de comparación). Conversiones puntero (puntero a la conversión miembro si los argumentos son punteros a miembros) y conversiones de calificación se aplican a dos operandos para obtener el compuesto' tipo de puntero, como sigue
Original:
Comparison operators can be used to compare two pointers (or pointers-to-members, for operator== and operator!= only), or a pointer and a null pointer constant, or two null pointer constants (but only as long as at least one of them is std::nullptr_t: comparison of NULL and NULL follows arithmetic comparison rules). Conversiones puntero (pointer to member conversions if the arguments are pointers to members) and conversiones de calificación are applied to both operands to obtain the composite pointer type, as follows
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Si ambos operandos son constantes de puntero nulo, el tipo de puntero compuesto es std::nullptr_t
Original:
If both operands are null pointer constants, the composite pointer type is std::nullptr_t
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Si un operando una constante de puntero nulo y el otro es un puntero, el tipo de compuesto es exactamente el tipo de puntero
Original:
If one operand a null pointer constant and the other is a pointer, the composite type is exactly the pointer type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Si ambos operandos son punteros a la misma, con diferentes cv-calificación, el compuesto es un puntero al mismo tipo con la CV-calificación que es una unión de la CV-calificaciones de los argumentos .
Original:
If both operands are pointers to the same type, with different cv-qualification, the composite is pointer to the same type with cv-qualification that is a union of the cv-qualifications of the arguments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tenga en cuenta que esto implica que cualquier puntero puede ser comparado con void* .
Original:
Note that this implies that any pointer can be compared with void*.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Resultados de la comparación de dos punteros (después de conversiones) se determina como sigue:
Original:
Results of comparing two pointers (after conversions) are determined as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Si los punteros p y q
Original:
If the pointers p and q
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a)
apuntan al mismo objeto o función
Original:
point to the same object or function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
b)
o un punto más allá del final de la misma matriz
Original:
or point one past the end of the same array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c)
o son ambos punteros nulos
Original:
or are both null pointers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
entonces los punteros' son iguales: p==q, p<=q, y p>=q retorno true, mientras p!=q, p<q, y p>q retorno false,
Original:
then the pointers compare equal: p==q, p<=q, and p>=q return true, while p!=q, p<q, and p>q return false,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Si uno de los operandos es un puntero nulo y el otro no, se comparan desigual: p==q true vuelve, vuelve p!=q false, el comportamiento de los demás operadores no se especifica .
Original:
If one of the operands is a null pointer and the other is not, they compare unequal: p==q returns true, p!=q returns false, the behavior of other operators is unspecified.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Si los punteros p y q punto a los miembros de la misma matriz y a[i] a[j] o una pasado el final de la matriz, que resulta de la comparación de los punteros es el mismo que el resultado de la comparación de los índices: si i<j==true entonces {{{1}}} .
Original:
If the pointers p and q point to members of the same array a[i] and a[j] or one past the end of the array, they results of comparing the pointers is the same as the result of comparing the indexes: if i<j==true then {{{1}}}.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Si los punteros p y q punto a miembros no estáticos de datos dentro de la misma clase o subobjetos base diferentes dentro de la misma clase derivada, o de sus miembros o subobjetos, recursivamente, y si los miembros apuntados a / subobjetos tienen el mismo control de acceso (por ejemplo, ambos public:), y la clase no es un sindicato, a continuación, el puntero hasta el subobjeto más tarde declarado / member son mayores que el puntero hasta el subobjeto antes declarado / miembro. En otras palabras, los miembros de la clase en cada uno de los tres modos de acceso están situados en la memoria en el orden de la declaración .
Original:
If the pointers p and q point to non-static data members within the same class or different base subobjects within the same derived class, or to their members or subobjects, recursively, and if the pointed-to members/subobjects have the same access control (e.g. both public:), and the class is not a union, then the pointer to the later declared subobject/member compares greater than the pointer to the earlier declared subobject/member. In other words, class members in each of the three access modes are positioned in memory in order of declaration.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
Si los punteros p y punto q a los miembros de la union mismo, que son iguales (normalmente una conversión explícita a void* se requiere para uno de los operandos)
Original:
If the pointers p and q point to members of the same union, they compare equal (typically an explicit conversion to void* is required for one of the operands)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
Si uno de los punteros es un puntero a void y ambos apuntan punteros a la misma dirección o ambos punteros nulos, que son iguales .
Original:
If one of the pointers is a pointer to void and both pointers point to the same address or are both null pointers, they compare equal.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
Si dos constantes de puntero nulo se comparan, que son iguales .
Original:
If two null pointer constants are compared, they compare equal.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
9)
Si ambos operandos son punteros a miembro (objeto o función), se comparan iguales si ambos apuntan al mismo miembro de la clase más derivada .
Original:
If both operands are pointers to member (object or function), they compare equal if they both point to the same member of the most derived class.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
10)
En caso contrario (si los punteros apuntan a objetos en diferentes matrices, o para funciones diferentes, o a los miembros de un objeto con control de acceso diferente, etc), los resultados de p<q, p>q, p<=q, y p>=q están especificados, y p!=q false rendimientos.
Original:
Otherwise (if the pointers point to objects in different arrays, or to different functions, or to members of some object with different access control, etc), the results of p<q, p>q, p<=q, and p>=q are unspecified, and p!=q returns false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

#include <iostream>
struct Foo  { int n1; int n2; };
union Union { int n; double d; };
int main()
{
    std::cout << std::boolalpha;
 
    char a[4] = "abc";
 
    char* p1 = &a[1];
    char* p2 = &a[2];
    std::cout << "Pointers to array elements: p1 == p2 " << (p1 == p2)
              << ", p1 < p2 "  << (p1 < p2) << '\n';
 
    Foo f;
    int* p3 = &f.n1;
    int* p4 = &f.n2;
    std::cout << "Pointers to members of a class: p3 == p4 " << (p3 == p4)
              << ", p3 < p4 "  << (p3 < p4) << '\n';
 
    Union u;
    int* p5 = &u.n;
    double* p6 = &u.d;
    std::cout << "Pointers to members of a union: p5 == (void*)p6 " << (p5 == (void*)p6)
              << ", p5 < p6 "  << (p5 < (void*)p6) << '\n';
}

Output:

Pointers to array elements: p1 == p2 false, p1 < p2 true
Pointers to members of a class: p3 == p4 false, p3 < p4 true
Pointers to members of a union: p5 == (void*)p6 true, p5 < p6 false

[editar] Notas

Debido a que estos grupos los operadores de izquierda a derecha, el a<b<c expresión se analiza (a<b)<c y a<(b<c) o no (a<b)&&(b<c) .
Original:
Because these operators group left-to-right, the expression a<b<c is parsed (a<b)<c, and not a<(b<c) or (a<b)&&(b<c).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Un requisito común para definida por el usuario operator< es ordenamiento débil estricto. En particular, esto es requerido por los algoritmos estándar y recipientes que trabajan con tipos LessThanComparable: std::sort, std::max_element, std::map, etc
Original:
A common requirement for user-defined operator< is ordenamiento débil estricto. In particular, this is required by the standard algorithms and containers that work with LessThanComparable types: std::sort, std::max_element, std::map, etc.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Aunque los resultados de la comparación de punteros de origen aleatorio (por ejemplo, no todos apuntando a los miembros de la misma matriz) es indeterminada, muchas implementaciones proporcionar total de estricto orden de punteros, por ejemplo, si se aplican como direcciones dentro de un espacio continuo de direcciones virtuales. Dichas implementaciones que no (por ejemplo, donde no todos los bits del puntero son parte de una dirección de memoria y tienen que ser ignorados para la comparación, o un cálculo adicional se requiere o no puntero y entero no es una relación de 1 a 1), proporcionan un especialización de std::less para los punteros que tiene esa garantía. Esto hace posible el uso de todos los punteros de origen aleatorio como claves en los contenedores normalizados asociativas tales como std::set o std::map .
Original:
Although the results of comparing pointers of random origin (e.g. not all pointing to members of the same array) is unspecified, many implementations provide total de estricto orden of pointers, e.g. if they are implemented as addresses within continuous virtual address space. Those implementations that do not (e.g. where not all bits of the pointer are part of a memory address and have to be ignored for comparison, or an additional calculation is required or otherwise pointer and integer is not a 1 to 1 relationship), provide a specialization of std::less for pointers that has that guarantee. This makes it possible to use all pointers of random origin as keys in standard associative containers such as std::set or std::map.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Biblioteca estándar

Los operadores de comparación están sobrecargados para muchas clases de la biblioteca estándar .
Original:
Comparison operators are overloaded for many classes in the standard library.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
checks whether the objects refer to the same type
(miembro público of std::type_info función) [edit]
compara dos error_codes
Original:
compares two error_codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)
compara error_conditions y error_codes
Original:
compares error_conditions and error_codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)
lexicográficamente compara los valores del par
Original:
lexicographically compares the values in the pair
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la tupla
Original:
lexicographically compares the values in the tuple
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara el contenido
Original:
compares the contents
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::bitset función) [edit]
Compara dos instancias asignador
Original:
compares two allocator instances
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::allocator función) [edit]
se compara con otro o con unique_ptr nullptr
Original:
compares to another unique_ptr or with nullptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara con otro o con shared_ptr nullptr
Original:
compares with another shared_ptr or with nullptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara con una std::function std::nullptr
Original:
compares an std::function with std::nullptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos duraciones
Original:
compares two durations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos puntos de tiempo
Original:
compares two time points
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
Compara dos instancias scoped_allocator_adaptor
Original:
compares two scoped_allocator_adaptor instances
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::scoped_allocator_adaptor función) [edit]
compara los objetos std::type_info subyacentes
Original:
compares the underlying std::type_info objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::type_index función) [edit]
lexicográfico compara dos cadenas
Original:
lexicographically compares two strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
igualdad comparación entre los objetos de configuración regional
Original:
equality comparison between locale objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::locale función) [edit]
lexicográficamente compara los valores de la array
Original:
lexicographically compares the values in the array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la deque
Original:
lexicographically compares the values in the deque
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la forward_list
Original:
lexicographically compares the values in the forward_list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la list
Original:
lexicographically compares the values in the list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la vector
Original:
lexicographically compares the values in the vector
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la map
Original:
lexicographically compares the values in the map
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la multimap
Original:
lexicographically compares the values in the multimap
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la set
Original:
lexicographically compares the values in the set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la multiset
Original:
lexicographically compares the values in the multiset
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara los valores de la unordered_map
Original:
compares the values in the unordered_map
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara los valores de la unordered_multimap
Original:
compares the values in the unordered_multimap
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara los valores de la unordered_set
Original:
compares the values in the unordered_set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara los valores de la unordered_multiset
Original:
compares the values in the unordered_multiset
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la queue
Original:
lexicographically compares the values in the queue
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
lexicográficamente compara los valores de la stack
Original:
lexicographically compares the values in the stack
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara dos reverse_iterators para la igualdad
Original:
compares two reverse_iterators for equality
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
órdenes reverse_iterators
Original:
orders reverse_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos move_iterators
Original:
compares two move_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos istream_iterators
Original:
compares two istream_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos istreambuf_iterators
Original:
compares two istreambuf_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos números complejos o un complejo y un escalar
Original:
compares two complex numbers or a complex and a scalar
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara dos valarrays o un valarray con un valor
Original:
compares two valarrays or a valarray with a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla) [edit]
compara los estados internos de los dos motores de números pseudo-aleatorios
Original:
compares the internal states of two pseudo-random number engines
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
compara dos objetos de distribución
Original:
compares two distribution objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
lexicográficamente compara los valores en el recipiente
Original:
lexicographically compares the values in the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
lexicográfico compara los valores en el resultado del partido dos
Original:
lexicographically compares the values in the two match result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos regex_iterators
Original:
compares two regex_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos regex_token_iterators
Original:
compares two regex_token_iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función de plantilla)
compara dos objetos thread::id
Original:
compares two thread::id objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)
automatically generates comparison operators based on user-defined operator== and operator<
(función de plantilla) [edit]

[editar] Ver también

La precedencia de operadores

Common operators
asignación incrementNJdecrement aritmética lógico comparación memberNJaccess otro

a = b
a = rvalue
a += b
a -= b
a *= b
a /= b
a %= b
a &= b
a |= b
a ^= b
a <<= b
a >>= b

++a
--a
a++
a--

+a
-a
a + b
a - b
a * b
a / b
a % b
~a
a & b
a | b
a ^ b
a << b
a >> b

!a
a && b
a || b

a == b
a != b
a < b
a > b
a <= b
a >= b

a[b]
*a
&a
a->b
a.b
a->*b
a.*b

a(...)
a, b
(type) a
? :

Special operators
static_cast convierte un tipo a otro tipo
compatible
Original:
static_cast converts one type to another compatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dynamic_cast convierte clase base virtual a class
derivada
Original:
dynamic_cast converts virtual base class to derived class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_cast convierte un tipo a otro compatible con diferentes cv qualifiers
Original:
const_cast converts type to compatible type with different cv qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reinterpret_cast convierte el tipo de type
incompatible
Original:
reinterpret_cast converts type to incompatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
new asigna memory
Original:
new allocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete desasigna memory
Original:
delete deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof consulta el tamaño de un type
Original:
sizeof queries the size of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof... consulta el tamaño de un parámetro de paquete (desde C++11)
Original:
sizeof... queries the size of a parámetro de paquete (desde C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeid consulta la información de una type
Original:
typeid queries the type information of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
noexcept comprueba si una expresión puede lanzar una excepción (desde C++11)
Original:
noexcept checks if an expression can throw an exception (desde C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignof consultas requisitos de alineación de un (desde C++11) tipo
Original:
alignof queries alignment requirements of a type (desde C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.