diff --git a/libcxx/include/__functional/boyer_moore_searcher.h b/libcxx/include/__functional/boyer_moore_searcher.h index 7889232f4b919..019d470487081 100644 --- a/libcxx/include/__functional/boyer_moore_searcher.h +++ b/libcxx/include/__functional/boyer_moore_searcher.h @@ -125,8 +125,8 @@ class boyer_moore_searcher { template _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2> operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const { - static_assert(__is_same_uncvref::value_type, - typename iterator_traits<_RandomAccessIterator2>::value_type>::value, + static_assert(is_same_v::value_type, + typename iterator_traits<_RandomAccessIterator2>::value_type>, "Corpus and Pattern iterators must point to the same type"); if (__first == __last) return std::make_pair(__last, __last); @@ -256,8 +256,8 @@ class boyer_moore_horspool_searcher { template _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2> operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const { - static_assert(__is_same_uncvref::value_type, - typename std::iterator_traits<_RandomAccessIterator2>::value_type>::value, + static_assert(is_same_v::value_type, + typename std::iterator_traits<_RandomAccessIterator2>::value_type>, "Corpus and Pattern iterators must point to the same type"); if (__first == __last) return std::make_pair(__last, __last); diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h index b409ad7511f6c..1914ef5b31a57 100644 --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -45,7 +45,7 @@ class reference_wrapper : public __weak_result_type<_Tp> { public: template ()))>, - __enable_if_t::value, int> = 0> + __enable_if_t, reference_wrapper>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) { type& __f = static_cast<_Up&&>(__u); diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 61bc029dce4e6..7fe035c60224a 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -193,12 +193,12 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > { _LIBCPP_HIDE_FROM_ABI static key_type const& __get_key(__container_value_type const& __v) { return __v.first; } - template ::value, int> = 0> + template , __node_value_type>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI static __container_value_type const& __get_value(_Up& __t) { return __t.__get_value(); } - template ::value, int> = 0> + template , __container_value_type>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI static __container_value_type const& __get_value(_Up& __t) { return __t; } @@ -842,7 +842,7 @@ public: return __emplace_unique_key_args(_NodeTypes::__get_key(__x), std::move(__x)); } - template ::value, int> = 0> + template , __container_value_type>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI pair __insert_unique(_Pp&& __x) { return __emplace_unique(std::forward<_Pp>(__x)); } diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 403cfe1ba4036..7eca34f2402bf 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -521,7 +521,7 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > { typedef __container_value_type __map_value_type; static const bool __is_map = true; - template ::value, int> = 0> + template , __container_value_type>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI static key_type const& __get_key(_Up& __t) { return __t.first; } diff --git a/libcxx/include/__type_traits/remove_cvref.h b/libcxx/include/__type_traits/remove_cvref.h index 760deddca946d..c568e8df3099d 100644 --- a/libcxx/include/__type_traits/remove_cvref.h +++ b/libcxx/include/__type_traits/remove_cvref.h @@ -10,7 +10,6 @@ #define _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H #include <__config> -#include <__type_traits/is_same.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -31,9 +30,6 @@ template using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #endif // __has_builtin(__remove_cvref) -template -using __is_same_uncvref _LIBCPP_NODEBUG = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >; - #if _LIBCPP_STD_VER >= 20 template struct _LIBCPP_NO_SPECIALIZATIONS remove_cvref { diff --git a/libcxx/include/string b/libcxx/include/string index 48d43b78d4bd1..eedb3a1ea502d 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1127,7 +1127,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type()) @@ -1139,7 +1139,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) { __self_view __sv = __t; @@ -1148,7 +1148,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t, const allocator_type& __a) : __alloc_(__a) { @@ -1207,7 +1207,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const _Tp& __t) { __self_view __sv = __t; @@ -1344,7 +1344,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string >::value, + !is_same<__remove_cvref_t<_Tp>, basic_string >::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const _Tp& __t) { __self_view __sv = __t; @@ -1373,7 +1373,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const _Tp& __t) { __self_view __sv = __t; @@ -1384,7 +1384,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const _Tp& __t, size_type __pos, size_type __n = npos) { @@ -1511,7 +1511,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const _Tp& __t, size_type __pos, size_type __n = npos) { @@ -1581,7 +1581,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n = npos) { @@ -1662,7 +1662,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos) { @@ -2007,7 +2007,7 @@ public: template ::value && - !__is_same_uncvref<_Tp, basic_string>::value, + !is_same<__remove_cvref_t<_Tp>, basic_string>::value, int> = 0> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos) const { diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 61c89a0ca73bb..187795e8b43a7 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -890,7 +890,7 @@ public: return *this; } - template ::value, int> = 0> + template , value_type>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI __hash_value_type& operator=(_ValueTp&& __v) { __ref() = std::forward<_ValueTp>(__v); return *this;