Namespace
Varianti

Comparison operators

Da cppreference.com.
< cpp‎ | language

 
 
Linguaggio C + +
Temi generali
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.
Controllo del flusso
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.
Dichiarazioni esecuzione condizionale
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.
Iterazione dichiarazioni
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.
Vai dichiarazioni
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.
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dichiarazione di funzione
lambda funzione dichiarazione
funzione di modello
specificatore inline
eccezioni specifiche (deprecato)
noexcept specificatore (C++11)
Eccezioni
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spazi dei nomi
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
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)
Specifiers
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 specificatori
Durata di stoccaggio specificatori
constexpr specificatore (C++11)
specificatore auto (C++11)
alignas specificatore (C++11)
Inizializzazione
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Letterali
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Espressioni
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rappresentazioni alternative
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
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
Tipo alias dichiarazione (C++11)
attributi (C++11)
Lancia
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversioni implicite
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Fusione C-stile e funzionale
Occupazione della 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.
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specifiche per una classe di funzioni proprietà
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.
esplicito (C++11)
statico
Funzioni membro speciali
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.
Modelli
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
classe template
funzione di modello
modello di specializzazione
parametri confezioni (C++11)
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaggio in linea
 
Confronta gli argomenti.
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);
'Nota'
Original:
Notes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Tutti incorporato ritorno bool operatori, e la maggior parte definiti dall'utente sovraccarichi anche restituire bool modo definito dall'utente operatori possono essere utilizzati nello stesso modo come il built-in. Tuttavia, in una definita dall'utente overload dell'operatore, qualsiasi tipo può essere utilizzato come tipo di ritorno (compresi 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 può essere qualsiasi tipo comprendente 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.

Indice

[modifica] Spiegazione

Restituisce il risultato booleano del confronto tra i valori degli argomenti, che non sono modificati.
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.

[modifica] Aritmetici Operatori di confronto

Per ogni coppia di tipi aritmetici promosso L e R, compresi i tipi di enumerazione, le firme delle funzioni seguenti partecipare risoluzione di sovraccarico:
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);
Se gli operandi ha aritmetica o enumerazione (ambito o senza ambito), conversioni aritmetiche soliti vengono eseguiti seguendo le regole per operatori aritmetici. I valori vengono confrontati dopo conversioni:
Original:
If the operands has arithmetic or enumeration type (scoped or unscoped), usual arithmetic conversions are performed following the rules for operatori aritmetici. 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.

[modifica] Esempio

#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

[modifica] Pointer operatori di confronto

Per ogni P tipo che è o puntatore a oggetto o puntatore a funzione o std::nullptr_t, e per ogni MP tipo che è un puntatore a oggetto membro o puntatore a funzione membro, le firme delle funzioni seguenti partecipare risoluzione di sovraccarico:
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);
Operatori di confronto può essere utilizzata per confrontare due puntatori (o puntatori a membri, per operator== e operator!= solo) o un puntatore e un puntatore nullo costante, o due costanti puntatore nullo (ma solo finché almeno uno di essi è std::nullptr_t: confronto NULL NULL e segue regole di confronto aritmetiche). Pointer conversioni (puntatore a conversioni utente se gli argomenti sono puntatori a membri) e qualificazione conversioni vengono applicate a entrambi gli operandi per ottenere il composito' tipo di puntatore, come segue
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). Pointer conversioni (pointer to member conversions if the arguments are pointers to members) and qualificazione conversioni 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)
Se entrambi gli operandi sono costanti puntatori nulli, il tipo di puntatore composito è 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)
Se un operando una costante puntatore nullo e l'altro è un puntatore, il tipo composito è esattamente il tipo di puntatore
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)
Se entrambi gli operandi sono puntatori a dello stesso tipo, con diversi cv-qualificazione, il composito è puntatore allo stesso tipo di cv-qualificazione che è un unione delle qualifiche-cv degli argomenti.
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.
Si noti che questo implica che ogni puntatore può essere confrontato 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.
Risultati del confronto tra due puntatori (dopo le conversioni) sono determinate come segue:
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)
Se i puntatori p e 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)
puntare allo stesso oggetto o funzione
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 punto uno oltre la fine dello stesso array
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 sono entrambi puntatori nulli
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.
poi i puntatori risultano uguali: p==q, p<=q e p>=q ritorno true, mentre p!=q, p<q e p>q ritorno 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)
Se uno degli operandi è un puntatore nullo e l'altro no, si confronta disuguale: p==q torna true, p!=q ritorna false, il comportamento di altri operatori non è specificato.
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)
Se i puntatori p e q scegliere membri della matrice stessa e a[i] a[j] uno o oltre la fine della matrice, che risulta di confronto dei puntatori è uguale al risultato del confronto degli indici: se i<j==true poi {{{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)
Se i puntatori p e q punto di non-membri dati statici all'interno della stessa classe o oggetti secondari di base diverse nell'ambito della stessa classe derivata, o ai loro membri o suboggetti, in modo ricorsivo, e se le punte-ai soci / suboggetti hanno lo stesso comando di accesso (ad esempio, entrambi public:), e la classe non è un sindacato, quindi il puntatore alla sotto-oggetto poi dichiarato / membro risulta maggiore rispetto al puntatore alla sotto-oggetto in precedenza dichiarato / membro. In altre parole, i membri della classe in ciascuna delle tre modalità di accesso sono posizionati in memoria in ordine di dichiarazione.
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)
Se i puntatori p e punto q ai membri della union stesso, risultano uguali (tipicamente una conversione esplicita di void* è richiesta per uno degli operandi)
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)
Se uno dei puntatori è un puntatore a void e sia punto di puntatori allo stesso indirizzo o sono entrambi puntatori nulli, che risultano uguali.
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)
Se due costanti puntatori nulli sono confrontati, che risultano uguali.
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)
Se entrambi gli operandi sono puntatori a membro (oggetto o funzione), che risultano uguali se entrambi punto allo stesso membro della classe più derivata.
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)
In caso contrario (se i puntatori puntare a oggetti in matrici diverse, o per funzioni diverse, o ai membri di un oggetto con controllo di accesso diversi, ecc), i risultati di p<q, p>q, p<=q e p>=q non sono specificate, e p!=q ritorna false.
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.

[modifica] Esempio

#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

[modifica] Note

Perché questi gruppi operatori da sinistra a destra, la a<b<c espressione viene analizzata (a<b)<c, e non a<(b<c) o (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 comune per l'utente definito operator< è rigoroso ordine debole. In particolare, questo è richiesto dagli algoritmi standard e contenitori che lavorano con tipi LessThanComparable: std::sort, std::max_element, std::map, ecc
Original:
A common requirement for user-defined operator< is rigoroso ordine debole. 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.
Anche se i risultati del confronto puntatori di origine casuale (ad esempio non tutti indicando membri della matrice stessa) non è specificato, molte implementazioni forniscono totale rigoroso ordine di puntatori, ad esempio, se sono implementate come gli indirizzi all'interno di continuo spazio di indirizzi virtuali. Tali implementazioni che non (ad esempio se non tutti i bit del puntatore sono parte di un indirizzo di memoria e devono essere ignorati per confronto, o un calcolo aggiuntivo è richiesto o altrimenti puntatore e non è un numero intero relazione 1 a 1), forniscono un specializzazione di std::less per i puntatori che ha tale garanzia. In questo modo è possibile utilizzare tutti i puntatori di origine casuale come chiavi in ​​contenitori standard associativi come 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 totale rigoroso ordine 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.

[modifica] Libreria standard

Gli operatori di confronto sono sovraccarichi per molte classi della libreria standard.
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
(metodo pubblico) [modifica]
confronta due 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.

(funzione)
confronta error_conditions e 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.

(funzione)
lessicografico confronta i valori nella coppia
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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
confronta il contenuto
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.

(metodo pubblico) [modifica]
Confronta due istanze allocatore
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.

(metodo pubblico) [modifica]
confronto ad un altro 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.

(funzione di modello) [modifica]
confronta con un altro 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.

(funzione di modello) [modifica]
confronta con un 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.

(funzione di modello)
confronta due durate
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.

(funzione di modello)
confronta due punti temporali
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.

(funzione di modello)
Confronta due istanze 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.

(metodo pubblico) [modifica]
confronta gli oggetti std::type_info sottostanti
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.

(metodo pubblico) [modifica]
confronta due stringhe secondo l'ordine lessicografico
(funzione di modello) [modifica]
confronto di uguaglianza tra gli oggetti delle impostazioni internazionali
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.

(metodo pubblico) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
confronta i valori del 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.

(funzione di modello) [modifica]
confronta i valori del 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.

(funzione di modello) [modifica]
confronta i valori del 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.

(funzione di modello) [modifica]
confronta i valori del 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
lessicografico confronta i valori nella 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.

(funzione di modello) [modifica]
confronta due reverse_iterators per l'uguaglianza
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.

(funzione di modello)
ordini 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.

(funzione di modello)
confronta due 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.

(funzione di modello)
confronta due 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.

(funzione di modello)
confronta due 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.

(funzione di modello)
confronta due numeri complessi o di un complesso e uno scalare
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.

(funzione di modello) [modifica]
confronta due valarrays o un valarray con un valore
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.

(funzione di modello) [modifica]
confronta gli stati interni di due pseudo-casuali n.ro motori
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.

(funzione) [modifica]
confronta due oggetti di distribuzione
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.

(funzione) [modifica]
lessicografico confronta i valori nel contenitore
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.

(funzione) [modifica]
lessicografico confronta i valori del risultato due match
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.

(funzione di modello)
confronta due 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.

(funzione di modello)
confronta due 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.

(funzione di modello)
confronta due oggetti 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.

(funzione)
automatically generates comparison operators based on user-defined operator== and operator<
(funzione di modello) [modifica]

[modifica] Vedi anche

Precedenza degli operatori

Common operators
assegnazione incrementNJdecrement aritmetica logico confronto memberNJaccess altra

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 converte un tipo a un altro
tipo compatibile
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 converte classe virtuale di base per class
derivato
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 converte il tipo di tipo compatibile con diversi 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 converte tipo type
incompatibile
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 alloca 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 dealloca 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 interroga la dimensione di 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... interroga le dimensioni di un parametro confezione (dal C++11)
Original:
sizeof... queries the size of a parametro confezione (dal 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 interroga le informazioni sul tipo di 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 controlla se un'espressione può lanciare una (dal C++11)
un'eccezione
Original:
noexcept checks if an expression can throw an exception (dal 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 query requisiti di allineamento di un (dal C++11) tipo
Original:
alignof queries alignment requirements of a type (dal C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.