Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-09-04 23:28:19 +00:00
parent 04acacadca
commit 73d21a4f07
404 changed files with 1688 additions and 1557 deletions

View File

@@ -171,14 +171,14 @@ swap(_Tp (&__a)[_N], _Tp (&__b)[_N])
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
#ifdef _LIBCPP_MOVE
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typename conditional
<
!has_nothrow_move_constructor<_Tp>::value && has_copy_constructor<_Tp>::value,
const _Tp&,
_Tp&&
>::type
#else // _LIBCPP_MOVE
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
const _Tp&
#endif
move_if_noexcept(_Tp& __x)
@@ -207,7 +207,7 @@ struct pair
_LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
: first(__x), second(__y) {}
#ifdef _LIBCPP_MOVE
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _U1, class _U2,
class = typename enable_if<is_convertible<_U1, first_type >::value &&
@@ -253,11 +253,11 @@ struct pair
#endif // _LIBCPP_HAS_NO_VARIADICS
#else // _LIBCPP_MOVE
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template<class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) {}
#endif // _LIBCPP_MOVE
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void _LIBCPP_INLINE_VISIBILITY swap(pair& __p) {_STD::swap(*this, __p);}
private:
@@ -326,7 +326,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
swap(__x.second, __y.second);
}
#ifdef _LIBCPP_MOVE
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp> class reference_wrapper;
@@ -357,7 +357,7 @@ make_pair(_T1&& __t1, _T2&& __t2)
(_STD::forward<_T1>(__t1), _STD::forward<_T2>(__t2));
}
#else // _LIBCPP_MOVE
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _T1, class _T2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -367,7 +367,7 @@ make_pair(_T1 __x, _T2 __y)
return pair<_T1, _T2>(__x, __y);
}
#endif // _LIBCPP_MOVE
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#ifndef _LIBCPP_HAS_NO_VARIADICS