Synch up with recent changes in trunk
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/apple@136574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -146,6 +146,9 @@ typedef __char32_t char32_t;
|
||||
|
||||
#if !(__has_feature(cxx_auto_type))
|
||||
#define _LIBCPP_HAS_NO_AUTO_TYPE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return)
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#endif
|
||||
|
||||
|
@@ -1294,7 +1294,7 @@ struct __has_allocate_hint
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#if !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
template <class _Alloc, class _Tp, class ..._Args>
|
||||
decltype(_VSTD::declval<_Alloc>().construct(_VSTD::declval<_Tp*>(),
|
||||
|
@@ -3014,11 +3014,15 @@ struct __invoke_of
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
typename enable_if
|
||||
<
|
||||
is_move_constructible<_Tp>::value &&
|
||||
is_move_assignable<_Tp>::value
|
||||
>::type
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value &&
|
||||
is_nothrow_move_assignable<_Tp>::value)
|
||||
{
|
||||
|
@@ -226,9 +226,12 @@ struct _LIBCPP_VISIBLE pair
|
||||
|
||||
template<class _U1, class _U2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair(const pair<_U1, _U2>& __p,
|
||||
typename enable_if<is_constructible<_T1, _U1>::value &&
|
||||
is_constructible<_T2, _U2>::value>::type* = 0)
|
||||
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
|
||||
#endif
|
||||
)
|
||||
: first(__p.first), second(__p.second) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
|
@@ -817,6 +817,8 @@ public:
|
||||
valarray& operator=(const gslice_array<value_type>& __ga);
|
||||
valarray& operator=(const mask_array<value_type>& __ma);
|
||||
valarray& operator=(const indirect_array<value_type>& __ia);
|
||||
template <class _ValExpr>
|
||||
valarray& operator=(const __val_expr<_ValExpr>& __v);
|
||||
|
||||
// element access:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -2958,6 +2960,21 @@ valarray<_Tp>::operator=(const indirect_array<value_type>& __ia)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
template <class _ValExpr>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
valarray<_Tp>&
|
||||
valarray<_Tp>::operator=(const __val_expr<_ValExpr>& __v)
|
||||
{
|
||||
size_t __n = __v.size();
|
||||
if (size() != __n)
|
||||
resize(__n);
|
||||
value_type* __t = __begin_;
|
||||
for (size_t __i = 0; __i != __n; ++__t, ++__i)
|
||||
*__t = result_type(__v[__i]);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
__val_expr<__slice_expr<const valarray<_Tp>&> >
|
||||
|
@@ -56,6 +56,7 @@ std::get_terminate() _NOEXCEPT
|
||||
return __sync_fetch_and_add(&__terminate_handler, (std::terminate_handler)0);
|
||||
}
|
||||
|
||||
_ATTRIBUTE(noreturn)
|
||||
void
|
||||
std::terminate() _NOEXCEPT
|
||||
{
|
||||
|
Reference in New Issue
Block a user