STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
pair< _Ty1, _Ty2 > Struct Template Reference

Public Types

typedef pair< _Ty1, _Ty2 > _Myt
 
typedef _Ty1 first_type
 
typedef _Ty2 second_type
 

Public Member Functions

 pair ()
 
 pair (const _Ty1 &_Val1, const _Ty2 &_Val2)
 
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<const _Other1&, _Ty1>::value && is_convertible<const _Other2&, _Ty2>::value, void>::type>
 pair (const pair< _Other1, _Other2 > &_Right)
 
template<class _Other1 , class _Other2 >
_Mytoperator= (const pair< _Other1, _Other2 > &_Right)
 
template<class _Tuple1 , class _Tuple2 , size_t... _Indexes1, size_t... _Indexes2>
 pair (_Tuple1 &_Val1, _Tuple2 &_Val2, _Arg_idx< _Indexes1...>, _Arg_idx< _Indexes2...>)
 
template<class... _Types1, class... _Types2>
 pair (piecewise_construct_t, tuple< _Types1...> _Val1, tuple< _Types2...> _Val2) _NOEXCEPT_OP((is_nothrow_constructible< _Ty1
 
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<_Other1, _Ty1>::value && is_convertible<_Other2, _Ty2>::value, void>::type>
 pair (_Other1 &&_Val1, _Other2 &&_Val2) _NOEXCEPT_OP((is_nothrow_constructible< _Ty1
 
_Other1 &&::value second (_STD forward< _Other2 >(_Val2))
 
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<_Other1, _Ty1>::value && is_convertible<_Other2, _Ty2>::value, void>::type>
 pair (pair< _Other1, _Other2 > &&_Right) _NOEXCEPT_OP((is_nothrow_constructible< _Ty1
 
_Other1 &&::value second (_STD forward< _Other2 >(_Right.second))
 
template<class _Other1 , class _Other2 >
_Mytoperator= (pair< _Other1, _Other2 > &&_Right) _NOEXCEPT_OP((is_nothrow_assignable< _Ty1
 
_Mytoperator= (_Myt &&_Right) _NOEXCEPT_OP((is_nothrow_move_assignable< _Ty1 >
 
void swap (_Myt &_Right)&&_NOEXCEPT_OP(_Swap_adl(this-> second, _Right.second)))
 
_Mytoperator= (const _Myt &_Right)
 

Public Attributes

 second = _STD forward<_Other2>(_Right.second)
 
returnthis
 
_Ty1 first
 
_Ty2 second
 

Member Typedef Documentation

template<class _Ty1, class _Ty2>
typedef pair<_Ty1, _Ty2> pair< _Ty1, _Ty2 >::_Myt
template<class _Ty1, class _Ty2>
typedef _Ty1 pair< _Ty1, _Ty2 >::first_type
template<class _Ty1, class _Ty2>
typedef _Ty2 pair< _Ty1, _Ty2 >::second_type

Constructor & Destructor Documentation

template<class _Ty1, class _Ty2>
pair< _Ty1, _Ty2 >::pair ( )
inline
87  : first(), second()
88  { // default construct
89  }
_Ty1 first
Definition: utility:198
second
Definition: utility:167
template<class _Ty1, class _Ty2>
pair< _Ty1, _Ty2 >::pair ( const _Ty1 &  _Val1,
const _Ty2 &  _Val2 
)
inline
92  : first(_Val1), second(_Val2)
93  { // construct from specified values
94  }
_Ty1 first
Definition: utility:198
_Types1 &&::value _Val2
Definition: tuple:759
second
Definition: utility:167
template<class _Ty1, class _Ty2>
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<const _Other1&, _Ty1>::value && is_convertible<const _Other2&, _Ty2>::value, void>::type>
pair< _Ty1, _Ty2 >::pair ( const pair< _Other1, _Other2 > &  _Right)
inline
102  : first(_Right.first), second(_Right.second)
103  { // construct from compatible pair
104  }
_Ty1 first
Definition: utility:198
second
Definition: utility:167
template<class _Ty1 , class _Ty2 >
template<class _Tuple1 , class _Tuple2 , size_t... _Indexes1, size_t... _Indexes2>
pair< _Ty1, _Ty2 >::pair ( _Tuple1 &  _Val1,
_Tuple2 &  _Val2,
_Arg_idx< _Indexes1...>  ,
_Arg_idx< _Indexes2...>   
)
inline
744  : first(_STD get<_Indexes1>(_STD move(_Val1))...),
745  second(_STD get<_Indexes2>(_STD move(_Val2))...)
746  { // construct from pair of tuples
747  }
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
_Ty1 first
Definition: utility:198
_Types1 &&::value _Val2
Definition: tuple:759
second
Definition: utility:167
template<class _Ty1 , class _Ty2 >
template<class... _Types1, class... _Types2>
pair< _Ty1, _Ty2 >::pair ( piecewise_construct_t  ,
tuple< _Types1...>  _Val1,
tuple< _Types2...>  _Val2 
)
inline
template<class _Ty1, class _Ty2>
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<_Other1, _Ty1>::value && is_convertible<_Other2, _Ty2>::value, void>::type>
pair< _Ty1, _Ty2 >::pair ( _Other1 &&  _Val1,
_Other2 &&  _Val2 
)
template<class _Ty1, class _Ty2>
template<class _Other1 , class _Other2 , class = typename enable_if<is_convertible<_Other1, _Ty1>::value && is_convertible<_Other2, _Ty2>::value, void>::type>
pair< _Ty1, _Ty2 >::pair ( pair< _Other1, _Other2 > &&  _Right)

Member Function Documentation

template<class _Ty1, class _Ty2>
template<class _Other1 , class _Other2 >
_Myt& pair< _Ty1, _Ty2 >::operator= ( const pair< _Other1, _Other2 > &  _Right)
inline
109  { // assign from compatible pair
110  first = _Right.first;
111  second = _Right.second;
112  return (*this);
113  }
_Ty1 first
Definition: utility:198
second
Definition: utility:167
template<class _Ty1, class _Ty2>
template<class _Other1 , class _Other2 >
_Myt& pair< _Ty1, _Ty2 >::operator= ( pair< _Other1, _Other2 > &&  _Right)
template<class _Ty1, class _Ty2>
_Myt& pair< _Ty1, _Ty2 >::operator= ( _Myt &&  _Right)
inline
174  { // assign from moved pair
175  first = _STD forward<_Ty1>(_Right.first);
176  second = _STD forward<_Ty2>(_Right.second);
177  return (*this);
178  }
_Ty1 first
Definition: utility:198
void * _Right
Definition: utility:36
second
Definition: utility:167
template<class _Ty1, class _Ty2>
_Myt& pair< _Ty1, _Ty2 >::operator= ( const _Myt _Right)
inline
192  { // assign from copied pair
193  first = _Right.first;
194  second = _Right.second;
195  return (*this);
196  }
_Ty1 first
Definition: utility:198
void * _Right
Definition: utility:36
second
Definition: utility:167
template<class _Ty1, class _Ty2>
_Other1&& ::value pair< _Ty1, _Ty2 >::second ( _STD forward< _Other2 >  _Val2)
inline
144  { // construct from moved values
145  }
template<class _Ty1, class _Ty2>
_Other1&& ::value pair< _Ty1, _Ty2 >::second ( _STD forward< _Other2 >  _Right.second)
inline
157  { // construct from moved compatible pair
158  }
template<class _Ty1, class _Ty2>
void pair< _Ty1, _Ty2 >::swap ( _Myt _Right) -> second, _Right.second)))
inline
183  { // exchange contents with _Right
184  if (this != &_Right)
185  { // different, worth swapping
186  _Swap_adl(first, _Right.first);
187  _Swap_adl(second, _Right.second);
188  }
189  }
_Ty1 first
Definition: utility:198
void * _Right
Definition: utility:36
second
Definition: utility:167

Member Data Documentation

template<class _Ty1, class _Ty2>
_Ty1 pair< _Ty1, _Ty2 >::first
template<class _Ty1, class _Ty2>
pair< _Ty1, _Ty2 >::second = _STD forward<_Other2>(_Right.second)
template<class _Ty1, class _Ty2>
_Ty2 pair< _Ty1, _Ty2 >::second
template<class _Ty1, class _Ty2>
return* pair< _Ty1, _Ty2 >::this

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