62 #ifdef __GXX_EXPERIMENTAL_CXX0X__
66 namespace std _GLIBCXX_VISIBILITY(default)
68 _GLIBCXX_BEGIN_NAMESPACE_VERSION
70 #ifdef __GXX_EXPERIMENTAL_CXX0X__
86 template<
class _T1,
class _T2>
89 typedef _T1 first_type;
100 : first(), second() { }
103 _GLIBCXX_CONSTEXPR
pair(
const _T1& __a,
const _T2& __b)
104 : first(__a), second(__b) { }
107 template<
class _U1,
class _U2>
109 : first(__p.first), second(__p.second) { }
111 #ifdef __GXX_EXPERIMENTAL_CXX0X__
112 constexpr
pair(
const pair&) =
default;
118 template<
class _U1,
class =
typename
120 pair(_U1&& __x,
const _T2& __y)
121 : first(std::
forward<_U1>(__x)), second(__y) { }
123 template<
class _U2,
class =
typename
125 pair(
const _T1& __x, _U2&& __y)
126 : first(__x), second(std::
forward<_U2>(__y)) { }
128 template<
class _U1,
class _U2,
class =
typename
131 pair(_U1&& __x, _U2&& __y)
132 : first(std::
forward<_U1>(__x)), second(std::
forward<_U2>(__y)) { }
134 template<
class _U1,
class _U2>
135 pair(pair<_U1, _U2>&& __p)
136 : first(std::
forward<_U1>(__p.first)),
137 second(std::
forward<_U2>(__p.second)) { }
139 template<
class... _Args1,
class... _Args2>
140 pair(piecewise_construct_t,
141 tuple<_Args1...> __first, tuple<_Args2...> __second)
142 : first(__cons<first_type>(std::move(__first))),
143 second(__cons<second_type>(std::move(__second))) { }
146 operator=(
const pair& __p)
154 operator=(pair&& __p)
156 first = std::move(__p.first);
157 second = std::move(__p.second);
161 template<
class _U1,
class _U2>
163 operator=(
const pair<_U1, _U2>& __p)
170 template<
class _U1,
class _U2>
172 operator=(pair<_U1, _U2>&& __p)
174 first = std::move(__p.first);
175 second = std::move(__p.second);
183 swap(first, __p.first);
184 swap(second, __p.second);
188 template<
typename _Tp,
typename... _Args>
190 __cons(tuple<_Args...>&&);
192 template<
typename _Tp,
typename... _Args,
int... _Indexes>
194 __do_cons(tuple<_Args...>&&,
const _Index_tuple<_Indexes...>&);
199 template<
class _T1,
class _T2>
200 inline _GLIBCXX_CONSTEXPR
bool
205 template<
class _T1,
class _T2>
206 inline _GLIBCXX_CONSTEXPR
bool
208 {
return __x.
first < __y.first
209 || (!(__y.first < __x.first) && __x.second < __y.second); }
212 template<
class _T1,
class _T2>
213 inline _GLIBCXX_CONSTEXPR
bool
215 {
return !(__x == __y); }
218 template<
class _T1,
class _T2>
219 inline _GLIBCXX_CONSTEXPR
bool
221 {
return __y < __x; }
224 template<
class _T1,
class _T2>
225 inline _GLIBCXX_CONSTEXPR
bool
227 {
return !(__y < __x); }
230 template<
class _T1,
class _T2>
231 inline _GLIBCXX_CONSTEXPR
bool
233 {
return !(__x < __y); }
235 #ifdef __GXX_EXPERIMENTAL_CXX0X__
239 template<
class _T1,
class _T2>
257 #ifdef __GXX_EXPERIMENTAL_CXX0X__
259 template<
class _T1,
class _T2>
260 inline pair<typename __decay_and_strip<_T1>::__type,
261 typename __decay_and_strip<_T2>::__type>
264 typedef typename __decay_and_strip<_T1>::__type __ds_type1;
265 typedef typename __decay_and_strip<_T2>::__type __ds_type2;
267 return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
270 template<
class _T1,
class _T2>
271 inline pair<_T1, _T2>
273 {
return pair<_T1, _T2>(__x, __y); }
276 _GLIBCXX_END_NAMESPACE_VERSION