32 _GLIBCXX_BEGIN_NAMESPACE_TR1
37 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
38 template<std::
size_t _Int,
class _Tp>
40 template<
int _Int,
class _Tp>
45 template<
class _Tp1,
class _Tp2>
46 struct tuple_size<std::pair<_Tp1, _Tp2> >
47 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
48 {
static const std::size_t value = 2; };
50 {
static const int value = 2; };
53 template<
class _Tp1,
class _Tp2>
54 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
59 tuple_size<std::pair<_Tp1, _Tp2> >::value;
61 template<
class _Tp1,
class _Tp2>
62 struct tuple_element<0, std::pair<_Tp1, _Tp2> >
63 {
typedef _Tp1 type; };
65 template<
class _Tp1,
class _Tp2>
66 struct tuple_element<1, std::pair<_Tp1, _Tp2> >
67 {
typedef _Tp2 type; };
69 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
70 template<std::
size_t _Int>
79 template<
typename _Tp1,
typename _Tp2>
81 {
return __pair.
first; }
83 template<
typename _Tp1,
typename _Tp2>
85 {
return __pair.
first; }
91 template<
typename _Tp1,
typename _Tp2>
95 template<
typename _Tp1,
typename _Tp2>
100 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
101 template<std::
size_t _Int,
class _Tp1,
class _Tp2>
103 template<
int _Int,
class _Tp1,
class _Tp2>
105 inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
107 {
return __pair_get<_Int>::__get(__in); }
109 #ifdef _GLIBCXX_INCLUDE_AS_CXX0X
110 template<std::
size_t _Int,
class _Tp1,
class _Tp2>
112 template<
int _Int,
class _Tp1,
class _Tp2>
114 inline const typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
116 {
return __pair_get<_Int>::__const_get(__in); }
118 _GLIBCXX_END_NAMESPACE_TR1
pair holds two objects of arbitrary type.
_T2 second
second is a copy of the second object
_T1 first
first is a copy of the first object