Udostępnij za pośrednictwem


operator!= (pair) (STL/CLR)

Para jest równa porównania.

template<typename Value1,
    typename Value2>
    bool operator!=(pair<Value1, Value2>% left,
        pair<Value1, Value2>% right);

Parametry

  • od lewej
    Lewy para do porównania.

  • prawo
    Para prawo do porównania.

Uwagi

The operator function returns !(left == right).Można go użyć do przetestowania czy left nie jest taki sam, jak zamówione right po dwie pary są porównaniu element za elementem.

Przykład

// cliext_pair_operator_ne.cpp 
// compile with: /clr 
#include <cliext/utility> 
 
int main() 
    { 
    cliext::pair<wchar_t, int> c1(L'x', 3); 
    System::Console::WriteLine("[{0}, {1}]", c1.first, c1.second); 
    cliext::pair<wchar_t, int> c2(L'x', 4); 
    System::Console::WriteLine("[{0}, {1}]", c2.first, c2.second); 
 
    System::Console::WriteLine("[x 3] != [x 3] is {0}", 
        c1 != c1); 
    System::Console::WriteLine("[x 3] != [x 4] is {0}", 
        c1 != c2); 
    return (0); 
    } 
 
  

Wymagania

Nagłówek:<cliext/narzędzia>

Przestrzeń nazw: cliext

Zobacz też

Informacje

pair (STL/CLR)

operator== (pair) (STL/CLR)

operator< (pair) (STL/CLR)

operator>= (pair) (STL/CLR)

operator> (pair) (STL/CLR)

operator<= (pair) (STL/CLR)