summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/utility
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
committerdim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
commit708d8e446e991358da23bb52ec5320440221f12f (patch)
tree3a061d75674cd5b60d9f6df45d0b8d755da3782f /contrib/libc++/include/utility
parentb8c74d455d2690e710a0802a98a9d310995a52eb (diff)
parent13334223d751d249ccd6475b8cba36ff71ddc972 (diff)
downloadFreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.zip
FreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.tar.gz
Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with compiling certain ports that exercise C++11 mode (i.e. Firefox). Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files, which are referred to in all the source files. MFC after: 1 month
Diffstat (limited to 'contrib/libc++/include/utility')
-rw-r--r--contrib/libc++/include/utility14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libc++/include/utility b/contrib/libc++/include/utility
index 279d421..df693ec 100644
--- a/contrib/libc++/include/utility
+++ b/contrib/libc++/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)) {}
@@ -419,7 +419,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> class reference_wrapper;
+template <class _Tp> class _LIBCPP_VISIBLE reference_wrapper;
template <class _Tp>
struct ___make_pair_return
OpenPOWER on IntegriCloud