diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-07-01 20:12:51 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-07-01 20:12:51 +0000 |
commit | b929de3c3d5c11d6136be1f59838788b8797ac12 (patch) | |
tree | 44bf0362437864830e68b5e3139ea97519bca466 /libcxx/include | |
parent | 95d880933b940078a5e80cd50a3d206ac528faa7 (diff) | |
download | bcm5719-llvm-b929de3c3d5c11d6136be1f59838788b8797ac12.tar.gz bcm5719-llvm-b929de3c3d5c11d6136be1f59838788b8797ac12.zip |
Changed constraints on pair and tuple constructors from is_convertible to is_constructible.
llvm-svn: 134252
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/__tuple | 4 | ||||
-rw-r--r-- | libcxx/include/utility | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/libcxx/include/__tuple b/libcxx/include/__tuple index a9514c1e36f..918656ed838 100644 --- a/libcxx/include/__tuple +++ b/libcxx/include/__tuple @@ -214,11 +214,7 @@ struct __tuple_convertible_imp : public false_type {}; template <class _Tp0, class ..._Tp, class _Up0, class ..._Up> struct __tuple_convertible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> > : public integral_constant<bool, -#if 1 // waiting on cwg 1170 - is_convertible<_Tp0, _Up0>::value && -#else is_constructible<_Up0, _Tp0>::value && -#endif __tuple_convertible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {}; template <> diff --git a/libcxx/include/utility b/libcxx/include/utility index 3850f8f3524..d0aee559a31 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -227,8 +227,8 @@ struct _LIBCPP_VISIBLE pair template<class _U1, class _U2> _LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p, - typename enable_if<is_convertible<_U1, _T1>::value && - is_convertible<_U2, _T2>::value>::type* = 0) + typename enable_if<is_constructible<_T1, _U1>::value && + is_constructible<_T2, _U2>::value>::type* = 0) : first(__p.first), second(__p.second) {} _LIBCPP_INLINE_VISIBILITY @@ -253,8 +253,8 @@ struct _LIBCPP_VISIBLE pair #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _U1, class _U2, - class = typename enable_if<is_convertible<_U1, first_type >::value && - is_convertible<_U2, second_type>::value>::type> + class = typename enable_if<is_constructible<first_type, _U1 >::value && + is_constructible<second_type, _U2>::value>::type> _LIBCPP_INLINE_VISIBILITY pair(_U1&& __u1, _U2&& __u2) : first(_VSTD::forward<_U1>(__u1)), @@ -264,8 +264,8 @@ struct _LIBCPP_VISIBLE pair template<class _U1, class _U2> _LIBCPP_INLINE_VISIBILITY pair(pair<_U1, _U2>&& __p, - typename enable_if<is_convertible<_U1, _T1>::value && - is_convertible<_U2, _T2>::value>::type* = 0) + typename enable_if<is_constructible<_T1, _U1>::value && + is_constructible<_T2, _U2>::value>::type* = 0) : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} |