forked from OSchip/llvm-project
[libc++] Guard bits of 598983d7
against _LIBCPP_HAS_NO_CONCEPTS.
This commit is contained in:
parent
f587ff3ee1
commit
b2a0cc1c65
|
@ -389,7 +389,7 @@ operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
|
|||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
#if _LIBCPP_STD_VER > 20
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class _T1, class _T2, class _U1, class _U2, template<class> class _TQual, template<class> class _UQual>
|
||||
requires requires { typename pair<common_reference_t<_TQual<_T1>, _UQual<_U1>>,
|
||||
common_reference_t<_TQual<_T2>, _UQual<_U2>>>; }
|
||||
|
@ -403,7 +403,7 @@ template <class _T1, class _T2, class _U1, class _U2>
|
|||
struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
|
||||
using type = pair<common_type_t<_T1, _U1>, common_type_t<_T2, _U2>>;
|
||||
};
|
||||
#endif
|
||||
#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
template <class _T1, class _T2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
|
||||
|
|
|
@ -1116,7 +1116,7 @@ public:
|
|||
void swap(tuple&) _NOEXCEPT {}
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 20
|
||||
#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
template <class... _TTypes, class... _UTypes, template<class> class _TQual, template<class> class _UQual>
|
||||
requires requires { typename tuple<common_reference_t<_TQual<_TTypes>, _UQual<_UTypes>>...>; }
|
||||
struct basic_common_reference<tuple<_TTypes...>, tuple<_UTypes...>, _TQual, _UQual> {
|
||||
|
@ -1128,7 +1128,7 @@ template <class... _TTypes, class... _UTypes>
|
|||
struct common_type<tuple<_TTypes...>, tuple<_UTypes...>> {
|
||||
using type = tuple<common_type_t<_TTypes, _UTypes>...>;
|
||||
};
|
||||
#endif
|
||||
#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
|
||||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
template <class ..._Tp>
|
||||
|
|
|
@ -196,7 +196,7 @@ struct std::basic_common_reference<A, std::tuple<B>, TQual, UQual> {
|
|||
using type = tuple<UQual<B>>;
|
||||
};
|
||||
|
||||
static_assert(std::is_same_v<std::common_reference_t<A, std::tuple<B>,std::tuple<D>>, std::tuple<B>>);
|
||||
static_assert(std::is_same_v<std::common_reference_t<A, std::tuple<B>, std::tuple<D>>, std::tuple<B>>);
|
||||
|
||||
|
||||
static_assert(std::is_same_v<std::common_reference_t<std::pair<int, int>>,
|
||||
|
|
|
@ -360,7 +360,7 @@ int main(int, char**)
|
|||
static_assert(std::is_same_v<std::common_type_t<std::tuple<const int&>>, std::tuple<int>>);
|
||||
static_assert(std::is_same_v<std::common_type_t<std::tuple<const volatile int&>, std::tuple<const volatile long&>>, std::tuple<long>>);
|
||||
|
||||
static_assert(std::is_same_v<std::common_type_t<A, std::tuple<B>,std::tuple<C>>, std::tuple<B>>);
|
||||
static_assert(std::is_same_v<std::common_type_t<A, std::tuple<B>, std::tuple<C>>, std::tuple<B>>);
|
||||
|
||||
static_assert(std::is_same_v<std::common_type_t<std::pair<int, int>>, std::pair<int, int>>);
|
||||
static_assert(std::is_same_v<std::common_type_t<std::pair<int, long>, std::pair<long, int>>, std::pair<long, long>>);
|
||||
|
@ -373,7 +373,7 @@ int main(int, char**)
|
|||
std::pair<const volatile long&, const volatile int&>>,
|
||||
std::pair<long, long>>);
|
||||
|
||||
static_assert(std::is_same_v<std::common_type_t<A, std::tuple<B>,std::tuple<C>>, std::tuple<B>>);
|
||||
static_assert(std::is_same_v<std::common_type_t<A, std::tuple<B>, std::tuple<C>>, std::tuple<B>>);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue