diff --git a/include/optional b/include/optional index 88fd6b5ab..1f8e491da 100644 --- a/include/optional +++ b/include/optional @@ -612,8 +612,8 @@ private: }; template using _CheckOptionalArgsCtor = conditional_t< - !is_same_v, in_place_t> && - !is_same_v, 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, optional> && + !is_same_v<__uncvref_t<_Up>, optional> && !(is_same_v<_Up, value_type> && is_scalar_v) >, is_constructible, diff --git a/include/tuple b/include/tuple index 2e19f7ca8..b3a17e7b7 100644 --- a/include/tuple +++ b/include/tuple @@ -211,7 +211,7 @@ public: template ::type, __tuple_leaf>> + __lazy_not::type, __tuple_leaf>> , is_constructible<_Hp, _Tp> >::value >::type @@ -293,7 +293,7 @@ public: template ::type, __tuple_leaf>> + __lazy_not::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>>::type{}) + typename __make_tuple_indices>>::type{}) ) template @@ -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>>::type{}) + typename __make_tuple_indices>>::type{}) ) #undef _LIBCPP_NOEXCEPT_RETURN diff --git a/include/type_traits b/include/type_traits index 13a771264..5cb3b5c63 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1180,9 +1180,7 @@ struct __is_same_uncvref : is_same::type, #if _LIBCPP_STD_VER > 17 // aligned_union - same as __uncvref template -struct remove_cvref { - using type = remove_cv_t>; -}; +struct remove_cvref : public __uncvref<_Tp> {}; template using remove_cvref_t = typename remove_cvref<_Tp>::type; #endif diff --git a/include/variant b/include/variant index 987b8a798..63c7677c5 100644 --- a/include/variant +++ b/include/variant @@ -1143,9 +1143,9 @@ public: template < class _Arg, - enable_if_t, variant>, int> = 0, - enable_if_t>::value, int> = 0, - enable_if_t>::value, int> = 0, + enable_if_t, variant>, int> = 0, + enable_if_t>::value, int> = 0, + enable_if_t>::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, variant>, int> = 0, + enable_if_t, variant>, int> = 0, class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>, size_t _Ip = __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,