63 _GLIBCXX_BEGIN_NAMESPACE(
std)
66 template<class _T1, class _T2>
80 : first(), second() { }
83 pair(
const _T1& __a,
const _T2& __b)
84 : first(__a), second(__b) { }
86 #ifdef __GXX_EXPERIMENTAL_CXX0X__
87 template<
class _U1,
class _U2>
88 pair(_U1&& __x, _U2&& __y)
89 : first(
std::forward<_U1>(__x)),
90 second(
std::forward<_U2>(__y)) { }
93 : first(
std::move(__p.first)),
94 second(
std::move(__p.second)) { }
98 template<
class _U1,
class _U2>
101 second(__p.second) { }
103 #ifdef __GXX_EXPERIMENTAL_CXX0X__
104 template<
class _U1,
class _U2>
106 : first(
std::move(__p.first)),
107 second(
std::move(__p.second)) { }
110 template<
class _U1,
class _Arg0,
class... _Args>
111 pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
112 : first(
std::forward<_U1>(__x)),
113 second(
std::forward<_Arg0>(__arg0),
114 std::forward<_Args>(__args)...) { }
117 operator=(pair&& __p)
124 template<
class _U1,
class _U2>
126 operator=(pair<_U1, _U2>&& __p)
137 swap(first, __p.first);
138 swap(second, __p.second);
144 template<
class _T1,
class _T2>
150 template<
class _T1,
class _T2>
153 {
return __x.
first < __y.first
154 || (!(__y.first < __x.first) && __x.second < __y.second); }
157 template<
class _T1,
class _T2>
160 {
return !(__x == __y); }
163 template<
class _T1,
class _T2>
166 {
return __y < __x; }
169 template<
class _T1,
class _T2>
172 {
return !(__y < __x); }
175 template<
class _T1,
class _T2>
178 {
return !(__x < __y); }
180 #ifdef __GXX_EXPERIMENTAL_CXX0X__
184 template<
class _T1,
class _T2>
189 template<
class _T1,
class _T2>
191 swap(pair<_T1, _T2>&& __x, pair<_T1, _T2>& __y)
194 template<
class _T1,
class _T2>
196 swap(pair<_T1, _T2>& __x, pair<_T1, _T2>&& __y)
212 #ifndef __GXX_EXPERIMENTAL_CXX0X__
213 template<
class _T1,
class _T2>
214 inline pair<_T1, _T2>
215 make_pair(_T1 __x, _T2 __y)
216 {
return pair<_T1, _T2>(__x, __y); }
218 template<
typename _Tp>
222 template<
typename _Tp>
223 struct __strip_reference_wrapper
228 template<
typename _Tp>
234 template<
typename _Tp>
235 struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
240 template<
typename _Tp>
241 struct __decay_and_strip
243 typedef typename __strip_reference_wrapper<
244 typename decay<_Tp>::type>::__type __type;
248 template<
class _T1,
class _T2>
249 inline pair<typename __decay_and_strip<_T1>::__type,
250 typename __decay_and_strip<_T2>::__type>
251 make_pair(_T1&& __x, _T2&& __y)
253 return pair<typename __decay_and_strip<_T1>::__type,
254 typename __decay_and_strip<_T2>::__type>
255 (std::forward<_T1>(__x), std::forward<_T2>(__y));
259 _GLIBCXX_END_NAMESPACE
bool operator==(const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Two pairs of the same type are equal iff their members are equal.
_T2 second_type
second_type is the second bound type
_T1 first
first is a copy of the first object
ISO C++ entities toplevel namespace is std.
bool operator!=(const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator== to find the result.
bool operator>(const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator< to find the result.
_T2 second
second is a copy of the second object
pair holds two objects of arbitrary type.
A convenience wrapper for creating a pair from two objects.
bool operator>=(const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
Uses operator< to find the result.
_OI move(_II __first, _II __last, _OI __result)
Moves the range [first,last) into result.
pair(const _T1 &__a, const _T2 &__b)
pair(const pair< _U1, _U2 > &__p)
_T1 first_type
first_type is the first bound type
void swap(_Tp &, _Tp &)
Swaps two values.