diff options
-rw-r--r-- | libcxx/include/optional | 6 | ||||
-rw-r--r-- | libcxx/include/tuple | 8 | ||||
-rw-r--r-- | libcxx/include/type_traits | 4 | ||||
-rw-r--r-- | libcxx/include/variant | 8 |
4 files changed, 12 insertions, 14 deletions
diff --git a/libcxx/include/optional b/libcxx/include/optional index 88fd6b5aba2..1f8e491daae 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -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>, diff --git a/libcxx/include/tuple b/libcxx/include/tuple index 2e19f7ca8e9..b3a17e7b735 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -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 diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 13a77126444..5cb3b5c6322 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -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 diff --git a/libcxx/include/variant b/libcxx/include/variant index 987b8a7982d..63c7677c5d5 100644 --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -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, |