mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-27 13:50:23 +00:00
Implement P0777: Treating unnecessay decay
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68b20ca4d9
commit
52f9ca28a3
@ -612,8 +612,8 @@ private:
|
||||
};
|
||||
template <class _Up>
|
||||
using _CheckOptionalArgsCtor = conditional_t<
|
||||
!is_same_v<decay_t<_Up>, in_place_t> &&
|
||||
!is_same_v<decay_t<_Up>, optional>,
|
||||
!is_same_v<__uncvref_t<_Up>, in_place_t> &&
|
||||
!is_same_v<__uncvref_t<_Up>, optional>,
|
||||
_CheckOptionalArgsConstructor,
|
||||
__check_tuple_constructor_fail
|
||||
>;
|
||||
@ -761,7 +761,7 @@ public:
|
||||
class = enable_if_t
|
||||
<__lazy_and<
|
||||
integral_constant<bool,
|
||||
!is_same_v<decay_t<_Up>, optional> &&
|
||||
!is_same_v<__uncvref_t<_Up>, optional> &&
|
||||
!(is_same_v<_Up, value_type> && is_scalar_v<value_type>)
|
||||
>,
|
||||
is_constructible<value_type, _Up>,
|
||||
|
@ -211,7 +211,7 @@ public:
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
__lazy_and<
|
||||
__lazy_not<is_same<typename decay<_Tp>::type, __tuple_leaf>>
|
||||
__lazy_not<is_same<typename __uncvref<_Tp>::type, __tuple_leaf>>
|
||||
, is_constructible<_Hp, _Tp>
|
||||
>::value
|
||||
>::type
|
||||
@ -293,7 +293,7 @@ public:
|
||||
template <class _Tp,
|
||||
class = typename enable_if<
|
||||
__lazy_and<
|
||||
__lazy_not<is_same<typename decay<_Tp>::type, __tuple_leaf>>
|
||||
__lazy_not<is_same<typename __uncvref<_Tp>::type, __tuple_leaf>>
|
||||
, is_constructible<_Hp, _Tp>
|
||||
>::value
|
||||
>::type
|
||||
@ -1383,7 +1383,7 @@ constexpr decltype(auto) apply(_Fn && __f, _Tuple && __t)
|
||||
_LIBCPP_NOEXCEPT_RETURN(
|
||||
_VSTD::__apply_tuple_impl(
|
||||
_VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t),
|
||||
typename __make_tuple_indices<tuple_size_v<decay_t<_Tuple>>>::type{})
|
||||
typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
|
||||
)
|
||||
|
||||
template <class _Tp, class _Tuple, size_t... _Idx>
|
||||
@ -1398,7 +1398,7 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
constexpr _Tp make_from_tuple(_Tuple&& __t)
|
||||
_LIBCPP_NOEXCEPT_RETURN(
|
||||
_VSTD::__make_from_tuple_impl<_Tp>(_VSTD::forward<_Tuple>(__t),
|
||||
typename __make_tuple_indices<tuple_size_v<decay_t<_Tuple>>>::type{})
|
||||
typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
|
||||
)
|
||||
|
||||
#undef _LIBCPP_NOEXCEPT_RETURN
|
||||
|
@ -1180,9 +1180,7 @@ struct __is_same_uncvref : is_same<typename __uncvref<_Tp>::type,
|
||||
#if _LIBCPP_STD_VER > 17
|
||||
// aligned_union - same as __uncvref
|
||||
template <class _Tp>
|
||||
struct remove_cvref {
|
||||
using type = remove_cv_t<remove_reference_t<_Tp>>;
|
||||
};
|
||||
struct remove_cvref : public __uncvref<_Tp> {};
|
||||
|
||||
template <class _Tp> using remove_cvref_t = typename remove_cvref<_Tp>::type;
|
||||
#endif
|
||||
|
@ -1143,9 +1143,9 @@ public:
|
||||
|
||||
template <
|
||||
class _Arg,
|
||||
enable_if_t<!is_same_v<decay_t<_Arg>, variant>, int> = 0,
|
||||
enable_if_t<!__is_inplace_type<decay_t<_Arg>>::value, int> = 0,
|
||||
enable_if_t<!__is_inplace_index<decay_t<_Arg>>::value, int> = 0,
|
||||
enable_if_t<!is_same_v<__uncvref_t<_Arg>, variant>, int> = 0,
|
||||
enable_if_t<!__is_inplace_type<__uncvref_t<_Arg>>::value, int> = 0,
|
||||
enable_if_t<!__is_inplace_index<__uncvref_t<_Arg>>::value, int> = 0,
|
||||
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
|
||||
size_t _Ip =
|
||||
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
|
||||
@ -1215,7 +1215,7 @@ public:
|
||||
|
||||
template <
|
||||
class _Arg,
|
||||
enable_if_t<!is_same_v<decay_t<_Arg>, variant>, int> = 0,
|
||||
enable_if_t<!is_same_v<__uncvref_t<_Arg>, variant>, int> = 0,
|
||||
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
|
||||
size_t _Ip =
|
||||
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
|
||||
|
Loading…
Reference in New Issue
Block a user