std::pair
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <utility>
|
||
| template< class T1, |
||
std::pair es una plantilla de estructura que proporciona una manera de almacenar dos objetos heterogéneos como una sola unidad .Original:
std::pair is a struct template that provides a way to store two heterogeneous objects as a single unit.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Tipos de miembros
| Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
first_type
|
T1
|
second_type
|
T2
|
[editar] Objetos miembros
| Persona
Original: Member name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Type |
first
|
T1
|
second
|
T2
|
[editar] Las funciones miembro
| construye nuevo par Original: constructs new pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| asigna el contenido Original: assigns the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
| (C++11) |
intercambia los contenidos Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) |
[editar] Terceros funciones
| se crea un objeto de tipo pair, definido por los tipos de argumentosOriginal: creates a pair object of type, defined by the argument typesThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) | |
| lexicográficamente compara los valores del par Original: lexicographically compares the values in the pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) | |
| (C++11) |
el algoritmo se especializa std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) |
| (C++11) |
accede a un elemento de un pair Original: accesses an element of a pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) |
[editar] Clases de ayuda
| (C++11) |
obtiene el tamaño de un pair Original: obtains the size of a pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de especialización de plantilla) |
| se obtiene el tipo de los elementos de pair Original: obtains the type of the elements of pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de especialización de plantilla) | |