|
@@ -348,19 +348,8 @@ struct _LIBCPP_TYPE_VIS_ONLY pair
|
|
// Use the implicitly declared copy constructor in C++03
|
|
// Use the implicitly declared copy constructor in C++03
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- typedef typename remove_reference<_T1>::type _T1Unref;
|
|
|
|
- typedef typename remove_reference<_T2>::type _T2Unref;
|
|
|
|
-
|
|
|
|
-#if !defined(_LIBCPP_CXX03_LANG)
|
|
|
|
- typedef integral_constant<bool,
|
|
|
|
- is_copy_assignable<_T1>::value
|
|
|
|
- && is_copy_assignable<_T2>::value> _CanCopyAssign;
|
|
|
|
-#else
|
|
|
|
- typedef true_type _CanCopyAssign;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
- pair& operator=(typename conditional<_CanCopyAssign::value, pair, __nat>::type const& __p)
|
|
|
|
|
|
+ pair& operator=(const pair& __p)
|
|
_NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value &&
|
|
_NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value &&
|
|
is_nothrow_copy_assignable<second_type>::value)
|
|
is_nothrow_copy_assignable<second_type>::value)
|
|
{
|
|
{
|
|
@@ -388,15 +377,10 @@ struct _LIBCPP_TYPE_VIS_ONLY pair
|
|
: first(_VSTD::forward<_U1>(__p.first)),
|
|
: first(_VSTD::forward<_U1>(__p.first)),
|
|
second(_VSTD::forward<_U2>(__p.second)) {}
|
|
second(_VSTD::forward<_U2>(__p.second)) {}
|
|
|
|
|
|
- typedef integral_constant<bool,
|
|
|
|
- is_move_assignable<_T1>::value
|
|
|
|
- && is_move_assignable<_T2>::value> _CanMoveAssign;
|
|
|
|
-
|
|
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
pair&
|
|
pair&
|
|
- operator=(typename conditional<_CanMoveAssign::value, pair, __nat>::type&& __p)
|
|
|
|
- _NOEXCEPT_(is_nothrow_move_assignable<first_type>::value &&
|
|
|
|
- is_nothrow_move_assignable<second_type>::value)
|
|
|
|
|
|
+ operator=(pair&& __p) _NOEXCEPT_(is_nothrow_move_assignable<first_type>::value &&
|
|
|
|
+ is_nothrow_move_assignable<second_type>::value)
|
|
{
|
|
{
|
|
first = _VSTD::forward<first_type>(__p.first);
|
|
first = _VSTD::forward<first_type>(__p.first);
|
|
second = _VSTD::forward<second_type>(__p.second);
|
|
second = _VSTD::forward<second_type>(__p.second);
|
|
@@ -404,6 +388,7 @@ struct _LIBCPP_TYPE_VIS_ONLY pair
|
|
}
|
|
}
|
|
|
|
|
|
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
|
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
|
|
|
+
|
|
template<class _Tuple,
|
|
template<class _Tuple,
|
|
class = typename enable_if<__tuple_convertible<_Tuple, pair>::value>::type>
|
|
class = typename enable_if<__tuple_convertible<_Tuple, pair>::value>::type>
|
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
|
@@ -426,7 +411,7 @@ struct _LIBCPP_TYPE_VIS_ONLY pair
|
|
{}
|
|
{}
|
|
|
|
|
|
template <class _Tuple,
|
|
template <class _Tuple,
|
|
- class = typename enable_if<!is_same<typename decay<_Tuple>::type, pair>::value && __tuple_assignable<_Tuple, pair>::value>::type>
|
|
|
|
|
|
+ class = typename enable_if<__tuple_assignable<_Tuple, pair>::value>::type>
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
pair&
|
|
pair&
|
|
operator=(_Tuple&& __p)
|
|
operator=(_Tuple&& __p)
|