operator!= (hash_multiset)
[!NOTA]
Questo API è obsoleto.L'alternativa consiste unordered_set Class.
Test se il hash_multiset a sinistra dell'operatore non è uguale all'oggetto di hash_multiset a destra.
bool operator!=(
const hash_multiset <Key, Traits, Allocator>& _Left,
const hash_multiset <Key, Traits, Allocator>& _Right
);
Parametri
_Left
Oggetto di tipo hash_multiset._Right
Oggetto di tipo hash_multiset.
Valore restituito
true se i hash_multisets non sono uguali; false se i hash_multisets sono uguali.
Note
Il confronto tra oggetti di hash_multiset è basato pairwise su un confronto tra gli elementi.Due hash_multisets sono uguali se hanno lo stesso numero di elementi e i rispettivi elementi hanno gli stessi valori.In caso contrario, sono diversi.
In Visual C++ .NET 2003, i membri dei file di intestazione <hash_set> e <hash_map> non sono più nello spazio dei nomi di deviazione standard, ma sono stati spostati nello spazio dei nomi di stdext.Per ulteriori informazioni, vedere lo spazio dei nomi stdext.
Esempio
// hashset_op_ne.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hs1, hs2, hs3;
int i;
for ( i = 0 ; i < 3 ; i++ )
{
hs1.insert ( i );
hs2.insert ( i * i );
hs3.insert ( i );
}
if ( hs1 != hs2 )
cout << "The hash_multisets hs1 and hs2 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs2 are equal." << endl;
if ( hs1 != hs3 )
cout << "The hash_multisets hs1 and hs3 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs3 are equal." << endl;
}
Requisiti
intestazione: <hash_set>
Stdext diSpazio dei nomi: