pair::operator= (STL/CLR)

格納された値のペアを置き換えます。

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

パラメーター

  • [right]
    コピーするペア。

解説

メンバー演算子は、オブジェクトに right を、を返します *thisをコピーします。rightの値を保存したのペアのコピーと値のペアが格納された置換に使用されます。

使用例

// 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); 
    } 
 
  

必要条件

ヘッダー: <cliext とユーティリティ>

名前空間: の cliext

参照

関連項目

pair (STL/CLR)