make_pair (STL/CLR)

Cree pair de un par de valores.

template<typename Value1,
    typename Value2>
    pair<Value1, Value2> make_pair(Value1 first, Value2 second);

Parámetros

  • Value1
    El tipo del primer valor ajustado.

  • Value2
    El tipo del segundo valor ajustado.

  • first
    Primer valor a ajustar.

  • second
    Segundo valor a ajustar.

Comentarios

La función de la plantilla devuelve pair<Value1,Value2>(first,second).Se utiliza para construir un objeto de pair<Value1,Value2> de un par de valores.

Ejemplo

// cliext_make_pair.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); 
 
    c1 = cliext::make_pair(L'y', 4); 
    System::Console::WriteLine("[{0}, {1}]", c1.first, c1.second); 
    return (0); 
    } 
 
  

Requisitos

encabezado: <cliext/utilidad>

Cliext deespacio de nombres:

Vea también

Referencia

range_adapter (STL/CLR)