Embedded Template Library 1.0
|
pair holds two objects of arbitrary type More...
#include <utility.h>
Public Types | |
typedef T1 | first_type |
first_type is the first bound type | |
typedef T2 | second_type |
second_type is the second bound type | |
Public Member Functions | |
ETL_CONSTEXPR | pair () |
Default constructor. | |
ETL_CONSTEXPR14 | pair (const T1 &a, const T2 &b) |
Constructor from parameters. | |
template<typename U1 , typename U2 > | |
ETL_CONSTEXPR14 | pair (const pair< U1, U2 > &other) |
Copy constructor. | |
pair (const pair< T1, T2 > &other) | |
Copy constructor. | |
template<typename U1 , typename U2 > | |
operator std::pair< U1, U2 > () | |
Converting to std::pair. | |
template<typename U1 , typename U2 > | |
pair (const std::pair< U1, U2 > &other) | |
Constructing from std::pair. | |
void | swap (pair< T1, T2 > &other) |
pair< T1, T2 > & | operator= (const pair< T1, T2 > &other) |
template<typename U1 , typename U2 > | |
pair< U1, U2 > & | operator= (const pair< U1, U2 > &other) |
Public Attributes | |
T1 | first |
first is a copy of the first object | |
T2 | second |
second is a copy of the second object | |
pair holds two objects of arbitrary type
T1,T2 | The types of the elements that the pair stores |
Default constructor.
The default constructor creates first
and second
using their respective default constructors.
Constructor from parameters.
Two objects may be passed to a pair
constructor to be copied.
Copy constructor.
There is also a templated copy constructor for the pair
class itself.