pair::operator= (STL/CLR)

Replaces the stored pair of values.

    pair<Value1, Value2>% operator=(pair<Value1, Value2>% right);

Parameters

  • right
    Pair to copy.

Remarks

The member operator copies right to the object, then returns *this. You use it to replace the stored pair of values with a copy of the stored pair of values in right.

Example

// cliext_pair_operator_as.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); 
 
// assign to a new pair 
    cliext::pair<wchar_t, int> c2; 
    c2 = c1; 
    System::Console::WriteLine("[{0}, {1}]", c2.first, c2.second); 
    return (0); 
    } 
 
[x, 3]
[x, 3]

Requirements

Header: <cliext/utility>

Namespace: cliext

See Also

Reference

pair (STL/CLR)