diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-06-10 00:01:23 +0400 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-06-10 00:01:23 +0400 |
commit | c418654096fcf064c978e93a725fafb1522b8d9f (patch) | |
tree | dc0cc83414a8e4771fa27adc387518036f61fbde /libcxx/include/utility | |
parent | a54893c6620a006b744435d2acfbb601a4d8fd4a (diff) |
Revert pair constructors back to using is_convertible instead of is_constructible. This should pull things into alignment with the final draft. Fixes http://llvm.org/bugs/show_bug.cgi?id=13063#add_comment.
llvm-svn: 158280
Diffstat (limited to 'libcxx/include/utility')
-rw-r--r-- | libcxx/include/utility | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility index 279d42188821..a0e16a7f2958 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -233,8 +233,8 @@ struct _LIBCPP_VISIBLE pair _LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE - ,typename enable_if<is_constructible<_T1, _U1>::value && - is_constructible<_T2, _U2>::value>::type* = 0 + ,typename enable_if<is_convertible<const _U1&, _T1>::value && + is_convertible<const _U2&, _T2>::value>::type* = 0 #endif ) : first(__p.first), second(__p.second) {} @@ -261,8 +261,8 @@ struct _LIBCPP_VISIBLE pair #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _U1, class _U2, - class = typename enable_if<is_constructible<first_type, _U1 >::value && - is_constructible<second_type, _U2>::value>::type> + class = typename enable_if<is_convertible<_U1, first_type>::value && + is_convertible<_U2, second_type>::value>::type> _LIBCPP_INLINE_VISIBILITY pair(_U1&& __u1, _U2&& __u2) : first(_VSTD::forward<_U1>(__u1)), @@ -272,8 +272,8 @@ struct _LIBCPP_VISIBLE pair template<class _U1, class _U2> _LIBCPP_INLINE_VISIBILITY pair(pair<_U1, _U2>&& __p, - typename enable_if<is_constructible<_T1, _U1>::value && - is_constructible<_T2, _U2>::value>::type* = 0) + typename enable_if<is_convertible<_U1, _T1>::value && + is_convertible<_U2, _T2>::value>::type* = 0) : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} |