class template


template <class T1, class T2> struct pair;
Pair of values
This class couples together a pair of values, which may be of different types (T1 and T2). The individual values can be accessed through its public members first and second.

Pairs are a particular case of tuple.

Template parameters

Type of member first, aliased as first_type.
Type of member second, aliased as second_type.

Member types

member typedefinitionnotes
first_typeThe first template parameter (T1)Type of member first.
second_typeThe second template parameter (T2)Type of member second.

Member variables

member variabledefinition
firstThe first value in the pair
secondThe second value in the pair

Member functions

Non-member function overloads

Non-member class specializations

See also