From fe59276f04a2894eaba048ce5dbba7a6050ae9ab Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 9 Jun 2012 20:01:23 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@158280 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/utility | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/utility b/include/utility index 279d4218..a0e16a7f 100644 --- a/include/utility +++ b/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::value && - is_constructible<_T2, _U2>::value>::type* = 0 + ,typename enable_if::value && + is_convertible::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 ::value && - is_constructible::value>::type> + class = typename enable_if::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 _LIBCPP_INLINE_VISIBILITY pair(pair<_U1, _U2>&& __p, - typename enable_if::value && - is_constructible<_T2, _U2>::value>::type* = 0) + typename enable_if::value && + is_convertible<_U2, _T2>::value>::type* = 0) : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}