Embedded Template Library 1.0
etl::pair< T1, T2 > Struct Template Reference

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. More...
 
ETL_CONSTEXPR14 pair (const T1 &a, const T2 &b)
 Constructor from parameters. More...
 
template<typename U1 , typename U2 >
ETL_CONSTEXPR14 pair (const pair< U1, U2 > &other)
 Copy constructor. More...
 
 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
 

Detailed Description

template<typename T1, typename T2>
struct etl::pair< T1, T2 >

pair holds two objects of arbitrary type

Template Parameters
T1,T2The types of the elements that the pair stores

Constructor & Destructor Documentation

◆ pair() [1/3]

template<typename T1 , typename T2 >
ETL_CONSTEXPR etl::pair< T1, T2 >::pair ( )
inline

Default constructor.

The default constructor creates first and second using their respective default constructors.

◆ pair() [2/3]

template<typename T1 , typename T2 >
ETL_CONSTEXPR14 etl::pair< T1, T2 >::pair ( const T1 &  a,
const T2 &  b 
)
inline

Constructor from parameters.

Two objects may be passed to a pair constructor to be copied.

◆ pair() [3/3]

template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
ETL_CONSTEXPR14 etl::pair< T1, T2 >::pair ( const pair< U1, U2 > &  other)
inline

Copy constructor.

There is also a templated copy constructor for the pair class itself.


The documentation for this struct was generated from the following file: