std::pair
Материал из 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. |
| Заголовочный файл <utility>
|
||
| template< class T1, |
||
std::pair является структурой шаблона, который предоставляет возможность хранить два разнородных объектов, как единое целое.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.
Содержание |
[править] Член типов
| Член типа
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
|
[править] Член объектов
| Имя пользователя
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
|
[править] Член функций
| строит новую пару 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. (public функция-член) | |
| присваивает содержимое 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. (public функция-член) | |
| (C++11) |
свопы содержание 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. (public функция-член) |
[править] Не являющиеся членами функций
pair создает объект типа, определяемых типов аргументовOriginal: 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. (шаблон функции) | |
| лексикографически сравнивает значения в паре 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. (шаблон функции) | |
| (C++11) |
Специализируется 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. (шаблон функции) |
| (C++11) |
доступ к элементу 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. (шаблон функции) |
[править] Вспомогательные классы
| (C++11) |
получает размер 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. (специализация шаблона класса) |
| получает тип элементов 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. (специализация шаблона класса) | |