patch by Jesse Towner, and bug fix by Sebastian Redl

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-08-10 20:48:29 +00:00
parent 45783d2dfd
commit 60a0a8ef24
10 changed files with 168 additions and 38 deletions

View File

@@ -223,6 +223,8 @@ struct pair
second(_STD::forward<_U2>(__u2))
{}
#ifndef _LIBCPP_HAS_NO_VARIADICS
template<class _Tuple,
class = typename enable_if<__tuple_convertible<_Tuple, pair>::value>::type>
_LIBCPP_INLINE_VISIBILITY
@@ -233,7 +235,6 @@ struct pair
typename __make_tuple_types<_Tuple>::type>::type>(get<1>(__p)))
{}
#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args)
@@ -241,7 +242,6 @@ struct pair
typename __make_tuple_indices<sizeof...(_Args1)>::type(),
typename __make_tuple_indices<sizeof...(_Args2) >::type())
{}
#endif
template <class _Tuple,
class = typename enable_if<__tuple_assignable<_Tuple, pair>::value>::type>
@@ -256,6 +256,8 @@ struct pair
return *this;
}
#endif
#else
template<class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p)