diff --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h --- a/libcxx/include/__algorithm/copy.h +++ b/libcxx/include/__algorithm/copy.h @@ -40,7 +40,7 @@ template ::type, _OutValueT>::value + class = __enable_if_t, _OutValueT>::value && is_trivially_copy_assignable<_OutValueT>::value> > inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InValueT*, _OutValueT*> __copy_impl(_InValueT* __first, _InValueT* __last, _OutValueT* __result) { @@ -58,7 +58,7 @@ } template >::type, __iter_value_type<_OutIter> >::value + __enable_if_t >, __iter_value_type<_OutIter> >::value && __is_cpp17_contiguous_iterator::value && __is_cpp17_contiguous_iterator::value && is_trivially_copy_assignable<__iter_value_type<_OutIter> >::value diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h --- a/libcxx/include/__algorithm/iterator_operations.h +++ b/libcxx/include/__algorithm/iterator_operations.h @@ -97,7 +97,7 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void __validate_iter_reference() { - static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value, + static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__remove_cvref_t<_Iter> >::reference>::value, "It looks like your iterator's `iterator_traits::reference` does not match the return type of " "dereferencing the iterator, i.e., calling `*it`. This is undefined behavior according to [input.iterators] " "and can lead to dangling reference issues at runtime, so we are flagging this."); @@ -147,16 +147,16 @@ template _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 - __uncvref_t<_Iter> next(_Iter&& __it, - typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) { + __remove_cvref_t<_Iter> next(_Iter&& __it, + typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) { return std::next(std::forward<_Iter>(__it), __n); } // prev template _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 - __uncvref_t<_Iter> prev(_Iter&& __iter, - typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) { + __remove_cvref_t<_Iter> prev(_Iter&& __iter, + typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) { return std::prev(std::forward<_Iter>(__iter), __n); } diff --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h --- a/libcxx/include/__algorithm/move.h +++ b/libcxx/include/__algorithm/move.h @@ -41,7 +41,7 @@ template ::type, _OutType>::value + class = __enable_if_t, _OutType>::value && is_trivially_move_assignable<_OutType>::value> > inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InType*, _OutType*> __move_impl(_InType* __first, _InType* __last, _OutType* __result) { @@ -70,7 +70,7 @@ template ::value_type>::type, + __enable_if_t::value_type>, typename iterator_traits<_OutIter>::value_type>::value && __is_cpp17_contiguous_iterator<_InIter>::value && __is_cpp17_contiguous_iterator<_OutIter>::value diff --git a/libcxx/include/__algorithm/move_backward.h b/libcxx/include/__algorithm/move_backward.h --- a/libcxx/include/__algorithm/move_backward.h +++ b/libcxx/include/__algorithm/move_backward.h @@ -44,7 +44,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 typename enable_if < - is_same::type, _Up>::value && + is_same<__remove_const_t<_Tp>, _Up>::value && is_trivially_move_assignable<_Up>::value, _Up* >::type diff --git a/libcxx/include/__algorithm/partition.h b/libcxx/include/__algorithm/partition.h --- a/libcxx/include/__algorithm/partition.h +++ b/libcxx/include/__algorithm/partition.h @@ -79,7 +79,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator> __partition( _ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) { - return std::__partition_impl<__uncvref_t<_Predicate>&, _AlgPolicy>( + return std::__partition_impl<__remove_cvref_t<_Predicate>&, _AlgPolicy>( std::move(__first), std::move(__last), __pred, __iter_category); } diff --git a/libcxx/include/__algorithm/ranges_iterator_concept.h b/libcxx/include/__algorithm/ranges_iterator_concept.h --- a/libcxx/include/__algorithm/ranges_iterator_concept.h +++ b/libcxx/include/__algorithm/ranges_iterator_concept.h @@ -26,7 +26,7 @@ template consteval auto __get_iterator_concept() { - using _Iter = __uncvref_t<_IterMaybeQualified>; + using _Iter = __remove_cvref_t<_IterMaybeQualified>; if constexpr (contiguous_iterator<_Iter>) return contiguous_iterator_tag(); diff --git a/libcxx/include/__algorithm/ranges_merge.h b/libcxx/include/__algorithm/ranges_merge.h --- a/libcxx/include/__algorithm/ranges_merge.h +++ b/libcxx/include/__algorithm/ranges_merge.h @@ -47,7 +47,7 @@ class _Comp, class _Proj1, class _Proj2> -_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__uncvref_t<_InIter1>, __uncvref_t<_InIter2>, __uncvref_t<_OutIter>> +_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__remove_cvref_t<_InIter1>, __remove_cvref_t<_InIter2>, __remove_cvref_t<_OutIter>> __merge_impl( _InIter1&& __first1, _Sent1&& __last1, diff --git a/libcxx/include/__algorithm/ranges_partition.h b/libcxx/include/__algorithm/ranges_partition.h --- a/libcxx/include/__algorithm/ranges_partition.h +++ b/libcxx/include/__algorithm/ranges_partition.h @@ -43,7 +43,7 @@ template _LIBCPP_HIDE_FROM_ABI static constexpr - subrange<__uncvref_t<_Iter>> __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) { + subrange<__remove_cvref_t<_Iter>> __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) { auto&& __projected_pred = std::__make_projected(__pred, __proj); auto __result = std::__partition<_RangeAlgPolicy>( std::move(__first), std::move(__last), __projected_pred, __iterator_concept<_Iter>()); diff --git a/libcxx/include/__algorithm/ranges_partition_copy.h b/libcxx/include/__algorithm/ranges_partition_copy.h --- a/libcxx/include/__algorithm/ranges_partition_copy.h +++ b/libcxx/include/__algorithm/ranges_partition_copy.h @@ -43,7 +43,7 @@ template _LIBCPP_HIDE_FROM_ABI constexpr static partition_copy_result< - __uncvref_t<_InIter>, __uncvref_t<_OutIter1>, __uncvref_t<_OutIter2> + __remove_cvref_t<_InIter>, __remove_cvref_t<_OutIter1>, __remove_cvref_t<_OutIter2> > __partition_copy_fn_impl( _InIter&& __first, _Sent&& __last, _OutIter1&& __out_true, _OutIter2&& __out_false, _Pred& __pred, _Proj& __proj) { for (; __first != __last; ++__first) { diff --git a/libcxx/include/__algorithm/ranges_stable_partition.h b/libcxx/include/__algorithm/ranges_stable_partition.h --- a/libcxx/include/__algorithm/ranges_stable_partition.h +++ b/libcxx/include/__algorithm/ranges_stable_partition.h @@ -45,7 +45,7 @@ template _LIBCPP_HIDE_FROM_ABI static - subrange<__uncvref_t<_Iter>> __stable_partition_fn_impl( + subrange<__remove_cvref_t<_Iter>> __stable_partition_fn_impl( _Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) { auto __last_iter = ranges::next(__first, __last); diff --git a/libcxx/include/__algorithm/set_difference.h b/libcxx/include/__algorithm/set_difference.h --- a/libcxx/include/__algorithm/set_difference.h +++ b/libcxx/include/__algorithm/set_difference.h @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template < class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter> -_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> > +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__remove_cvref_t<_InIter1>, __remove_cvref_t<_OutIter> > __set_difference( _InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) { while (__first1 != __last1 && __first2 != __last2) { diff --git a/libcxx/include/__algorithm/stable_partition.h b/libcxx/include/__algorithm/stable_partition.h --- a/libcxx/include/__algorithm/stable_partition.h +++ b/libcxx/include/__algorithm/stable_partition.h @@ -305,7 +305,7 @@ _LIBCPP_HIDE_FROM_ABI _ForwardIterator __stable_partition( _ForwardIterator __first, _ForwardIterator __last, _Predicate&& __pred, _IterCategory __iter_category) { - return std::__stable_partition_impl<_AlgPolicy, __uncvref_t<_Predicate>&>( + return std::__stable_partition_impl<_AlgPolicy, __remove_cvref_t<_Predicate>&>( std::move(__first), std::move(__last), __pred, __iter_category); } diff --git a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h --- a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h +++ b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h @@ -42,9 +42,9 @@ using result_type = invoke_result_t<_Gen&>; _LIBCPP_HIDE_FROM_ABI - static constexpr auto min() { return __uncvref_t<_Gen>::min(); } + static constexpr auto min() { return __remove_cvref_t<_Gen>::min(); } _LIBCPP_HIDE_FROM_ABI - static constexpr auto max() { return __uncvref_t<_Gen>::max(); } + static constexpr auto max() { return __remove_cvref_t<_Gen>::max(); } _LIBCPP_HIDE_FROM_ABI constexpr explicit _ClassicGenAdaptor(_Gen& __g) : __gen(__g) {} diff --git a/libcxx/include/__concepts/class_or_enum.h b/libcxx/include/__concepts/class_or_enum.h --- a/libcxx/include/__concepts/class_or_enum.h +++ b/libcxx/include/__concepts/class_or_enum.h @@ -28,7 +28,7 @@ // Work around Clang bug https://llvm.org/PR52970 // TODO: remove this workaround once libc++ no longer has to support Clang 13 (it was fixed in Clang 14). template -concept __workaround_52970 = is_class_v<__uncvref_t<_Tp>> || is_union_v<__uncvref_t<_Tp>>; +concept __workaround_52970 = is_class_v<__remove_cvref_t<_Tp>> || is_union_v<__remove_cvref_t<_Tp>>; #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__coroutine/coroutine_handle.h b/libcxx/include/__coroutine/coroutine_handle.h --- a/libcxx/include/__coroutine/coroutine_handle.h +++ b/libcxx/include/__coroutine/coroutine_handle.h @@ -115,7 +115,7 @@ _LIBCPP_HIDE_FROM_ABI static coroutine_handle from_promise(_Promise& __promise) { - using _RawPromise = typename remove_cv<_Promise>::type; + using _RawPromise = __remove_cv_t<_Promise>; coroutine_handle __tmp; __tmp.__handle_ = __builtin_coro_promise(_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true); diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -141,15 +141,15 @@ template ::type, class _UnqualPtrType = - typename remove_const::type>::type, + __remove_const_t<__remove_pointer_t<_DS> >, bool _IsCharPtr = is_pointer<_DS>::value&& __can_convert_char<_UnqualPtrType>::value> struct __is_pathable_char_array : false_type {}; template struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true> - : __can_convert_char::type> { - using _Base = __can_convert_char::type>; + : __can_convert_char<__remove_const_t<_ECharT> > { + using _Base = __can_convert_char<__remove_const_t<_ECharT> >; _LIBCPP_HIDE_FROM_ABI static _ECharT const* __range_begin(const _ECharT* __b) { return __b; } diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h --- a/libcxx/include/__functional/bind.h +++ b/libcxx/include/__functional/bind.h @@ -25,9 +25,9 @@ template struct is_bind_expression : _If< - _IsSame<_Tp, __uncvref_t<_Tp> >::value, + _IsSame<_Tp, __remove_cvref_t<_Tp> >::value, false_type, - is_bind_expression<__uncvref_t<_Tp> > + is_bind_expression<__remove_cvref_t<_Tp> > > {}; #if _LIBCPP_STD_VER > 14 @@ -37,9 +37,9 @@ template struct is_placeholder : _If< - _IsSame<_Tp, __uncvref_t<_Tp> >::value, + _IsSame<_Tp, __remove_cvref_t<_Tp> >::value, integral_constant, - is_placeholder<__uncvref_t<_Tp> > + is_placeholder<__remove_cvref_t<_Tp> > > {}; #if _LIBCPP_STD_VER > 14 @@ -279,7 +279,7 @@ class = typename enable_if < is_constructible<_Fd, _Gp>::value && - !is_same::type, + !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value >::type> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 @@ -324,7 +324,7 @@ class = typename enable_if < is_constructible<_Fd, _Gp>::value && - !is_same::type, + !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value >::type> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -968,7 +968,7 @@ __func __f_; template , function>, + _IsNotSame<__remove_cvref_t<_Fp>, function>, __invokable<_Fp, _ArgTypes...> >::value> struct __callable; diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h --- a/libcxx/include/__functional/invoke.h +++ b/libcxx/include/__functional/invoke.h @@ -248,7 +248,7 @@ template struct __member_pointer_traits - : public __member_pointer_traits_imp::type, + : public __member_pointer_traits_imp<__remove_cv_t<_MP>, is_member_function_pointer<_MP>::value, is_member_object_pointer<_MP>::value> { diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -49,7 +49,7 @@ struct __is_hash_value_type : false_type {}; template -struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__uncvref_t<_One> > {}; +struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {}; _LIBCPP_FUNC_VIS size_t __next_prime(size_t __n); @@ -59,7 +59,7 @@ { typedef typename pointer_traits<_NodePtr>::element_type __node_type; typedef __hash_node_base __first_node; - typedef typename __rebind_pointer<_NodePtr, __first_node>::type __node_base_pointer; + typedef __rebind_pointer_t<_NodePtr, __first_node> __node_base_pointer; typedef _NodePtr __node_pointer; #if defined(_LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB) @@ -97,7 +97,7 @@ struct _LIBCPP_STANDALONE_DEBUG __hash_node : public __hash_node_base < - typename __rebind_pointer<_VoidPtr, __hash_node<_Tp, _VoidPtr> >::type + __rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> > > { typedef _Tp __node_value_type; @@ -209,9 +209,9 @@ template struct __hash_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> { typedef typename _KVTypes::__map_value_type _Mv; - typedef typename __rebind_pointer<_AllocPtr, _Mv>::type + typedef __rebind_pointer_t<_AllocPtr, _Mv> __map_value_type_pointer; - typedef typename __rebind_pointer<_AllocPtr, const _Mv>::type + typedef __rebind_pointer_t<_AllocPtr, const _Mv> __const_map_value_type_pointer; }; @@ -229,21 +229,21 @@ typedef ptrdiff_t difference_type; typedef size_t size_type; - typedef typename __rebind_pointer<_NodePtr, void>::type __void_pointer; + typedef __rebind_pointer_t<_NodePtr, void> __void_pointer; typedef typename pointer_traits<_NodePtr>::element_type __node_type; typedef _NodePtr __node_pointer; typedef __hash_node_base<__node_pointer> __node_base_type; - typedef typename __rebind_pointer<_NodePtr, __node_base_type>::type + typedef __rebind_pointer_t<_NodePtr, __node_base_type> __node_base_pointer; typedef typename __node_base_type::__next_pointer __next_pointer; typedef _Tp __node_value_type; - typedef typename __rebind_pointer<_VoidPtr, __node_value_type>::type + typedef __rebind_pointer_t<_VoidPtr, __node_value_type> __node_value_type_pointer; - typedef typename __rebind_pointer<_VoidPtr, const __node_value_type>::type + typedef __rebind_pointer_t<_VoidPtr, const __node_value_type> __const_node_value_type_pointer; private: @@ -251,7 +251,7 @@ "_NodePtr should never be a pointer to const"); static_assert((is_same::element_type, void>::value), "_VoidPtr does not point to unqualified void type"); - static_assert((is_same::type, + static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value), "_VoidPtr does not rebind to _NodePtr."); }; @@ -270,7 +270,7 @@ template struct __make_hash_node_types { typedef __hash_node<_NodeValueTp, _VoidPtr> _NodeTp; - typedef typename __rebind_pointer<_VoidPtr, _NodeTp>::type _NodePtr; + typedef __rebind_pointer_t<_VoidPtr, _NodeTp> _NodePtr; typedef __hash_node_types<_NodePtr> type; }; @@ -615,8 +615,8 @@ typedef pointer_traits<__node_pointer> __pointer_traits; typedef typename __pointer_traits::element_type __node; - typedef typename remove_const<__node>::type __non_const_node; - typedef typename __rebind_pointer<__node_pointer, __non_const_node>::type + typedef __remove_const_t<__node> __non_const_node; + typedef __rebind_pointer_t<__node_pointer, __non_const_node> __non_const_node_pointer; public: typedef __hash_local_iterator<__non_const_node_pointer> diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h --- a/libcxx/include/__iterator/distance.h +++ b/libcxx/include/__iterator/distance.h @@ -75,7 +75,7 @@ template> _Sp> _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Ip> operator()(_Ip&& __first, _Sp __last) const { - if constexpr (sized_sentinel_for<_Sp, __uncvref_t<_Ip>>) { + if constexpr (sized_sentinel_for<_Sp, __remove_cvref_t<_Ip>>) { return __last - __first; } else { return __last - decay_t<_Ip>(__first); diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -408,7 +408,7 @@ struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> { typedef ptrdiff_t difference_type; - typedef typename remove_cv<_Tp>::type value_type; + typedef __remove_cv_t<_Tp> value_type; typedef _Tp* pointer; typedef _Tp& reference; typedef random_access_iterator_tag iterator_category; @@ -493,7 +493,7 @@ using __iter_value_type = typename iterator_traits<_InputIterator>::value_type; template -using __iter_key_type = typename remove_const::value_type::first_type>::type; +using __iter_key_type = __remove_const_t::value_type::first_type>; template using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type; diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -82,7 +82,7 @@ typedef typename iterator_traits::reference __reference; typedef typename conditional< is_reference<__reference>::value, - typename remove_reference<__reference>::type&&, + __libcpp_remove_reference_t<__reference>&&, __reference >::type reference; #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -36,7 +36,7 @@ template struct __uses_alloc_ctor_imp { - typedef _LIBCPP_NODEBUG __uncvref_t<_Alloc> _RawAlloc; + typedef _LIBCPP_NODEBUG __remove_cvref_t<_Alloc> _RawAlloc; static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value; static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -33,7 +33,7 @@ // __pointer _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer); template ::type, + class _RawAlloc = __libcpp_remove_reference_t<_Alloc>, bool = __has_pointer<_RawAlloc>::value> struct __pointer { using type _LIBCPP_NODEBUG = typename _RawAlloc::pointer; diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -151,14 +151,13 @@ {return _VSTD::addressof(__r);} }; -template -struct __rebind_pointer { #ifndef _LIBCPP_CXX03_LANG - typedef typename pointer_traits<_From>::template rebind<_To> type; +template +using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>; #else - typedef typename pointer_traits<_From>::template rebind<_To>::other type; +template +using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other; #endif -}; // to_address diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -689,7 +689,7 @@ { typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; typedef __shared_ptr_pointer::pointer, - reference_wrapper::type>, + reference_wrapper<__libcpp_remove_reference_t<_Dp> >, _AllocT> _CntrlBlk; __cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT()); __enable_weak_this(__r.get(), __r.get()); @@ -906,7 +906,7 @@ _LIBCPP_HIDE_FROM_ABI void __enable_weak_this(const enable_shared_from_this<_Yp>* __e, _OrigPtr* __ptr) _NOEXCEPT { - typedef typename remove_cv<_Yp>::type _RawYp; + typedef __remove_cv_t<_Yp> _RawYp; if (__e && __e->__weak_this_.expired()) { __e->__weak_this_ = shared_ptr<_RawYp>(*this, diff --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h --- a/libcxx/include/__memory/uninitialized_algorithms.h +++ b/libcxx/include/__memory/uninitialized_algorithms.h @@ -557,7 +557,7 @@ template ::type, + class _RawType = __remove_const_t<_Type>, __enable_if_t< // using _RawType because of the allocator extension is_trivially_copy_constructible<_RawType>::value && is_trivially_copy_assignable<_RawType>::value && diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h --- a/libcxx/include/__memory/unique_ptr.h +++ b/libcxx/include/__memory/unique_ptr.h @@ -749,7 +749,7 @@ typename __unique_if<_Tp>::__unique_array_unknown_bound make_unique(size_t __n) { - typedef typename remove_extent<_Tp>::type _Up; + typedef __remove_extent_t<_Tp> _Up; return unique_ptr<_Tp>(new _Up[__n]()); } diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle --- a/libcxx/include/__node_handle +++ b/libcxx/include/__node_handle @@ -90,8 +90,8 @@ _NodeType, __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>>; typedef allocator_traits<_Alloc> __alloc_traits; - typedef typename __rebind_pointer::type + typedef __rebind_pointer_t __node_pointer_type; public: diff --git a/libcxx/include/__numeric/gcd_lcm.h b/libcxx/include/__numeric/gcd_lcm.h --- a/libcxx/include/__numeric/gcd_lcm.h +++ b/libcxx/include/__numeric/gcd_lcm.h @@ -60,8 +60,8 @@ gcd(_Tp __m, _Up __n) { static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to gcd must be integer types"); - static_assert((!is_same::type, bool>::value), "First argument to gcd cannot be bool" ); - static_assert((!is_same::type, bool>::value), "Second argument to gcd cannot be bool" ); + static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to gcd cannot be bool" ); + static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to gcd cannot be bool" ); using _Rp = common_type_t<_Tp,_Up>; using _Wp = make_unsigned_t<_Rp>; return static_cast<_Rp>(_VSTD::__gcd( @@ -75,8 +75,8 @@ lcm(_Tp __m, _Up __n) { static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to lcm must be integer types"); - static_assert((!is_same::type, bool>::value), "First argument to lcm cannot be bool" ); - static_assert((!is_same::type, bool>::value), "Second argument to lcm cannot be bool" ); + static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to lcm cannot be bool" ); + static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to lcm cannot be bool" ); if (__m == 0 || __n == 0) return 0; diff --git a/libcxx/include/__random/is_seed_sequence.h b/libcxx/include/__random/is_seed_sequence.h --- a/libcxx/include/__random/is_seed_sequence.h +++ b/libcxx/include/__random/is_seed_sequence.h @@ -23,7 +23,7 @@ { static _LIBCPP_CONSTEXPR const bool value = !is_convertible<_Sseq, typename _Engine::result_type>::value && - !is_same::type, _Engine>::value; + !is_same<__remove_cv_t<_Sseq>, _Engine>::value; }; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -47,7 +47,7 @@ public: typedef _Tp value_type; typedef _Allocator allocator_type; - typedef typename remove_reference::type __alloc_rr; + typedef __libcpp_remove_reference_t __alloc_rr; typedef allocator_traits<__alloc_rr> __alloc_traits; typedef value_type& reference; typedef const value_type& const_reference; diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -555,7 +555,7 @@ struct __is_tree_value_type : false_type {}; template -struct __is_tree_value_type<_One> : __is_tree_value_type_imp<__uncvref_t<_One> > {}; +struct __is_tree_value_type<_One> : __is_tree_value_type_imp<__remove_cvref_t<_One> > {}; template struct __tree_key_value_types { @@ -633,11 +633,11 @@ typedef _VoidPtr __void_pointer; typedef __tree_node_base<__void_pointer> __node_base_type; - typedef typename __rebind_pointer<_VoidPtr, __node_base_type>::type + typedef __rebind_pointer_t<_VoidPtr, __node_base_type> __node_base_pointer; typedef __tree_end_node<__node_base_pointer> __end_node_type; - typedef typename __rebind_pointer<_VoidPtr, __end_node_type>::type + typedef __rebind_pointer_t<_VoidPtr, __end_node_type> __end_node_pointer; #if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB) typedef __end_node_pointer __parent_pointer; @@ -660,9 +660,9 @@ template struct __tree_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> { typedef typename _KVTypes::__map_value_type _Mv; - typedef typename __rebind_pointer<_AllocPtr, _Mv>::type + typedef __rebind_pointer_t<_AllocPtr, _Mv> __map_value_type_pointer; - typedef typename __rebind_pointer<_AllocPtr, const _Mv>::type + typedef __rebind_pointer_t<_AllocPtr, const _Mv> __const_map_value_type_pointer; }; @@ -684,9 +684,9 @@ typedef _NodePtr __node_pointer; typedef _Tp __node_value_type; - typedef typename __rebind_pointer<_VoidPtr, __node_value_type>::type + typedef __rebind_pointer_t<_VoidPtr, __node_value_type> __node_value_type_pointer; - typedef typename __rebind_pointer<_VoidPtr, const __node_value_type>::type + typedef __rebind_pointer_t<_VoidPtr, const __node_value_type> __const_node_value_type_pointer; #if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB) typedef typename __base::__end_node_pointer __iter_pointer; @@ -699,13 +699,13 @@ private: static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const"); - static_assert((is_same::type, + static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value), "_VoidPtr does not rebind to _NodePtr."); }; template struct __make_tree_node_types { - typedef typename __rebind_pointer<_VoidPtr, __tree_node<_ValueTp, _VoidPtr> >::type + typedef __rebind_pointer_t<_VoidPtr, __tree_node<_ValueTp, _VoidPtr> > _NodePtr; typedef __tree_node_types<_NodePtr> type; }; @@ -1272,14 +1272,14 @@ } template ::type, __container_value_type>::value> > + class = __enable_if_t, __container_value_type>::value> > _LIBCPP_INLINE_VISIBILITY pair __insert_unique(_Vp&& __v) { return __emplace_unique(_VSTD::forward<_Vp>(__v)); } template ::type, __container_value_type>::value> > + class = __enable_if_t, __container_value_type>::value> > _LIBCPP_INLINE_VISIBILITY iterator __insert_unique(const_iterator __p, _Vp&& __v) { return __emplace_hint_unique(__p, _VSTD::forward<_Vp>(__v)); diff --git a/libcxx/include/__tuple b/libcxx/include/__tuple --- a/libcxx/include/__tuple +++ b/libcxx/include/__tuple @@ -328,7 +328,7 @@ struct __apply_cv_mf { template using __apply _LIBCPP_NODEBUG = const volatile _Tp&; }; -template ::type> +template > using __apply_cv_t _LIBCPP_NODEBUG = __apply_cv_mf< is_lvalue_reference<_Tp>::value, is_const<_RawTp>::value, @@ -363,13 +363,13 @@ >; }; -template ::type>::value, +template >::value, size_t _Sp = 0, - bool _SameSize = (_Ep == tuple_size::type>::value)> + bool _SameSize = (_Ep == tuple_size<__libcpp_remove_reference_t<_Tp> >::value)> struct __make_tuple_types { static_assert(_Sp <= _Ep, "__make_tuple_types input error"); - using _RawTp = typename remove_cv::type>::type; + using _RawTp = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>; using type = typename _Maker::template __apply_quals<_Tp>; }; @@ -408,7 +408,7 @@ // __tuple_convertible -template ::type>::value, +template >::value, bool = __tuple_like<_Up>::value> struct __tuple_convertible : public false_type {}; @@ -423,7 +423,7 @@ // __tuple_constructible -template ::type>::value, +template >::value, bool = __tuple_like<_Up>::value> struct __tuple_constructible : public false_type {}; @@ -438,7 +438,7 @@ // __tuple_assignable -template ::type>::value, +template >::value, bool = __tuple_like<_Up>::value> struct __tuple_assignable : public false_type {}; @@ -470,7 +470,7 @@ struct __tuple_like_with_size_imp : integral_constant {}; -template > +template > using __tuple_like_with_size _LIBCPP_NODEBUG = __tuple_like_with_size_imp< __tuple_like<_RawTuple>::value, tuple_size<_RawTuple>, _ExpectedSize diff --git a/libcxx/include/__type_traits/add_pointer.h b/libcxx/include/__type_traits/add_pointer.h --- a/libcxx/include/__type_traits/add_pointer.h +++ b/libcxx/include/__type_traits/add_pointer.h @@ -28,9 +28,9 @@ #else template ::value || _IsSame::type, void>::value> + bool = __libcpp_is_referenceable<_Tp>::value || _IsSame<__remove_cv_t<_Tp>, void>::value> struct __add_pointer_impl { - typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type* type; + typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp>* type; }; template struct __add_pointer_impl<_Tp, false> {typedef _LIBCPP_NODEBUG _Tp type;}; diff --git a/libcxx/include/__type_traits/apply_cv.h b/libcxx/include/__type_traits/apply_cv.h --- a/libcxx/include/__type_traits/apply_cv.h +++ b/libcxx/include/__type_traits/apply_cv.h @@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template ::type>::value, - bool = is_volatile::type>::value> +template >::value, + bool = is_volatile<__libcpp_remove_reference_t<_Tp> >::value> struct __apply_cv { typedef _LIBCPP_NODEBUG _Up type; diff --git a/libcxx/include/__type_traits/can_extract_key.h b/libcxx/include/__type_traits/can_extract_key.h --- a/libcxx/include/__type_traits/can_extract_key.h +++ b/libcxx/include/__type_traits/can_extract_key.h @@ -29,21 +29,21 @@ struct __extract_key_first_tag {}; template ::type> + class _RawValTy = __remove_const_ref_t<_ValTy> > struct __can_extract_key : conditional<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag>::type {}; template struct __can_extract_key<_Pair, _Key, pair<_First, _Second> > - : conditional<_IsSame::type, _Key>::value, + : conditional<_IsSame<__remove_const_t<_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag>::type {}; // __can_extract_map_key uses true_type/false_type instead of the tags. // It returns true if _Key != _ContainerValueTy (the container is a map not a set) // and _ValTy == _Key. template ::type> + class _RawValTy = __remove_const_ref_t<_ValTy> > struct __can_extract_map_key : integral_constant::value> {}; diff --git a/libcxx/include/__type_traits/decay.h b/libcxx/include/__type_traits/decay.h --- a/libcxx/include/__type_traits/decay.h +++ b/libcxx/include/__type_traits/decay.h @@ -34,7 +34,7 @@ #else template struct __decay { - typedef _LIBCPP_NODEBUG typename remove_cv<_Up>::type type; + typedef _LIBCPP_NODEBUG __remove_cv_t<_Up> type; }; template @@ -43,12 +43,12 @@ typedef _LIBCPP_NODEBUG typename conditional < is_array<_Up>::value, - typename remove_extent<_Up>::type*, + __remove_extent_t<_Up>*, typename conditional < is_function<_Up>::value, typename add_pointer<_Up>::type, - typename remove_cv<_Up>::type + __remove_cv_t<_Up> >::type >::type type; }; @@ -57,7 +57,7 @@ struct _LIBCPP_TEMPLATE_VIS decay { private: - typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up; + typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up; public: typedef _LIBCPP_NODEBUG typename __decay<_Up, __libcpp_is_referenceable<_Up>::value>::type type; }; diff --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h --- a/libcxx/include/__type_traits/is_convertible.h +++ b/libcxx/include/__type_traits/is_convertible.h @@ -53,7 +53,7 @@ } template ::type>::value> + unsigned = __is_convertible_imp::__is_array_function_or_void<__libcpp_remove_reference_t<_Tp> >::value> struct __is_convertible_check { static const size_t __v = 0; diff --git a/libcxx/include/__type_traits/is_destructible.h b/libcxx/include/__type_traits/is_destructible.h --- a/libcxx/include/__type_traits/is_destructible.h +++ b/libcxx/include/__type_traits/is_destructible.h @@ -63,7 +63,7 @@ template struct __destructible_imp<_Tp, false> : public integral_constant::type>::value> {}; + __is_destructor_wellformed<__remove_all_extents_t<_Tp> >::value> {}; template struct __destructible_imp<_Tp, true> diff --git a/libcxx/include/__type_traits/is_floating_point.h b/libcxx/include/__type_traits/is_floating_point.h --- a/libcxx/include/__type_traits/is_floating_point.h +++ b/libcxx/include/__type_traits/is_floating_point.h @@ -25,7 +25,7 @@ template <> struct __libcpp_is_floating_point : public true_type {}; template struct _LIBCPP_TEMPLATE_VIS is_floating_point - : public __libcpp_is_floating_point::type> {}; + : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h --- a/libcxx/include/__type_traits/is_integral.h +++ b/libcxx/include/__type_traits/is_integral.h @@ -58,7 +58,7 @@ #else template struct _LIBCPP_TEMPLATE_VIS is_integral - : public _BoolConstant<__libcpp_is_integral::type>::value> {}; + : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_member_function_pointer.h b/libcxx/include/__type_traits/is_member_function_pointer.h --- a/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/libcxx/include/__type_traits/is_member_function_pointer.h @@ -50,7 +50,7 @@ #else // __has_builtin(__is_member_function_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer - : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_func > {}; + : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func > {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_member_object_pointer.h b/libcxx/include/__type_traits/is_member_object_pointer.h --- a/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/libcxx/include/__type_traits/is_member_object_pointer.h @@ -32,7 +32,7 @@ #else // __has_builtin(__is_member_object_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer - : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_obj > {}; + : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj > {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_member_pointer.h b/libcxx/include/__type_traits/is_member_pointer.h --- a/libcxx/include/__type_traits/is_member_pointer.h +++ b/libcxx/include/__type_traits/is_member_pointer.h @@ -31,7 +31,7 @@ #else // __has_builtin(__is_member_pointer) template struct _LIBCPP_TEMPLATE_VIS is_member_pointer - : public _BoolConstant< __libcpp_is_member_pointer::type>::__is_member > {}; + : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member > {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h --- a/libcxx/include/__type_traits/is_nothrow_destructible.h +++ b/libcxx/include/__type_traits/is_nothrow_destructible.h @@ -72,7 +72,7 @@ is_reference<_Tp>::value> {}; template struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible - : public __libcpp_nothrow_destructor::type> {}; + : public __libcpp_nothrow_destructor<__remove_all_extents_t<_Tp> > {}; template struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]> diff --git a/libcxx/include/__type_traits/is_null_pointer.h b/libcxx/include/__type_traits/is_null_pointer.h --- a/libcxx/include/__type_traits/is_null_pointer.h +++ b/libcxx/include/__type_traits/is_null_pointer.h @@ -24,11 +24,11 @@ template <> struct __is_nullptr_t_impl : public true_type {}; template struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t - : public __is_nullptr_t_impl::type> {}; + : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER > 11 template struct _LIBCPP_TEMPLATE_VIS is_null_pointer - : public __is_nullptr_t_impl::type> {}; + : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h --- a/libcxx/include/__type_traits/is_pointer.h +++ b/libcxx/include/__type_traits/is_pointer.h @@ -43,7 +43,7 @@ #endif template struct _LIBCPP_TEMPLATE_VIS is_pointer - : public __libcpp_is_pointer::type>::type> {}; + : public __libcpp_is_pointer >::type> {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/is_reference_wrapper.h b/libcxx/include/__type_traits/is_reference_wrapper.h --- a/libcxx/include/__type_traits/is_reference_wrapper.h +++ b/libcxx/include/__type_traits/is_reference_wrapper.h @@ -24,7 +24,7 @@ template struct __is_reference_wrapper_impl : public false_type {}; template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public __is_reference_wrapper_impl::type> {}; + : public __is_reference_wrapper_impl<__remove_cv_t<_Tp> > {}; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/is_standard_layout.h b/libcxx/include/__type_traits/is_standard_layout.h --- a/libcxx/include/__type_traits/is_standard_layout.h +++ b/libcxx/include/__type_traits/is_standard_layout.h @@ -22,7 +22,7 @@ #if __has_builtin(__is_standard_layout) : public integral_constant #else - : integral_constant::type>::value> + : integral_constant >::value> #endif {}; diff --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h --- a/libcxx/include/__type_traits/is_trivially_destructible.h +++ b/libcxx/include/__type_traits/is_trivially_destructible.h @@ -35,7 +35,7 @@ is_reference<_Tp>::value> {}; template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible - : public __libcpp_trivial_destructor::type> {}; + : public __libcpp_trivial_destructor<__remove_all_extents_t<_Tp> > {}; template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]> : public false_type {}; diff --git a/libcxx/include/__type_traits/is_void.h b/libcxx/include/__type_traits/is_void.h --- a/libcxx/include/__type_traits/is_void.h +++ b/libcxx/include/__type_traits/is_void.h @@ -31,7 +31,7 @@ #else template struct _LIBCPP_TEMPLATE_VIS is_void - : public is_same::type, void> {}; + : public is_same<__remove_cv_t<_Tp>, void> {}; #if _LIBCPP_STD_VER > 14 template diff --git a/libcxx/include/__type_traits/make_const_lvalue_ref.h b/libcxx/include/__type_traits/make_const_lvalue_ref.h --- a/libcxx/include/__type_traits/make_const_lvalue_ref.h +++ b/libcxx/include/__type_traits/make_const_lvalue_ref.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -using __make_const_lvalue_ref = const typename remove_reference<_Tp>::type&; +using __make_const_lvalue_ref = const __libcpp_remove_reference_t<_Tp>&; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/make_signed.h b/libcxx/include/__type_traits/make_signed.h --- a/libcxx/include/__type_traits/make_signed.h +++ b/libcxx/include/__type_traits/make_signed.h @@ -67,7 +67,7 @@ # endif template -using __make_signed_t = typename __apply_cv<_Tp, typename __make_signed::type>::type>::type; +using __make_signed_t = typename __apply_cv<_Tp, typename __make_signed<__remove_cv_t<_Tp> >::type>::type; #endif // __has_builtin(__make_signed) diff --git a/libcxx/include/__type_traits/make_unsigned.h b/libcxx/include/__type_traits/make_unsigned.h --- a/libcxx/include/__type_traits/make_unsigned.h +++ b/libcxx/include/__type_traits/make_unsigned.h @@ -70,7 +70,7 @@ # endif template -using __make_unsigned_t = typename __apply_cv<_Tp, typename __make_unsigned::type>::type>::type; +using __make_unsigned_t = typename __apply_cv<_Tp, typename __make_unsigned<__remove_cv_t<_Tp> >::type>::type; #endif // __has_builtin(__make_unsigned) diff --git a/libcxx/include/__type_traits/remove_all_extents.h b/libcxx/include/__type_traits/remove_all_extents.h --- a/libcxx/include/__type_traits/remove_all_extents.h +++ b/libcxx/include/__type_traits/remove_all_extents.h @@ -23,6 +23,9 @@ struct remove_all_extents { using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp); }; + +template +using __remove_all_extents_t = __remove_all_extents(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_all_extents {typedef _Tp type;}; @@ -30,10 +33,13 @@ {typedef typename remove_all_extents<_Tp>::type type;}; template struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]> {typedef typename remove_all_extents<_Tp>::type type;}; + +template +using __remove_all_extents_t = typename remove_all_extents<_Tp>::type; #endif // __has_builtin(__remove_all_extents) #if _LIBCPP_STD_VER > 11 -template using remove_all_extents_t = typename remove_all_extents<_Tp>::type; +template using remove_all_extents_t = __remove_all_extents_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_const_ref.h b/libcxx/include/__type_traits/remove_const_ref.h --- a/libcxx/include/__type_traits/remove_const_ref.h +++ b/libcxx/include/__type_traits/remove_const_ref.h @@ -20,9 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct __unconstref { - typedef _LIBCPP_NODEBUG typename remove_const::type>::type type; -}; +using __remove_const_ref_t = __remove_const_t<__libcpp_remove_reference_t<_Tp> >; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_cv.h b/libcxx/include/__type_traits/remove_cv.h --- a/libcxx/include/__type_traits/remove_cv.h +++ b/libcxx/include/__type_traits/remove_cv.h @@ -24,13 +24,19 @@ struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); }; + +template +using __remove_cv_t = __remove_cv(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_cv -{typedef typename remove_volatile::type>::type type;}; +{typedef __remove_volatile_t<__remove_const_t<_Tp> > type;}; + +template +using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; #endif // __has_builtin(__remove_cv) #if _LIBCPP_STD_VER > 11 -template using remove_cv_t = typename remove_cv<_Tp>::type; +template using remove_cv_t = __remove_cv_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_cvref.h b/libcxx/include/__type_traits/remove_cvref.h --- a/libcxx/include/__type_traits/remove_cvref.h +++ b/libcxx/include/__type_traits/remove_cvref.h @@ -22,23 +22,22 @@ #if __has_builtin(__remove_cvref) template -using __uncvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else template -using __uncvref_t _LIBCPP_NODEBUG = typename remove_cv::type>::type; +using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; #endif // __has_builtin(__remove_cvref) template -struct __is_same_uncvref : _IsSame<__uncvref_t<_Tp>, __uncvref_t<_Up> > {}; +struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {}; #if _LIBCPP_STD_VER > 17 -// remove_cvref - same as __uncvref template struct remove_cvref { - using type _LIBCPP_NODEBUG = __uncvref_t<_Tp>; + using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>; }; -template using remove_cvref_t = __uncvref_t<_Tp>; +template using remove_cvref_t = __remove_cvref_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_extent.h b/libcxx/include/__type_traits/remove_extent.h --- a/libcxx/include/__type_traits/remove_extent.h +++ b/libcxx/include/__type_traits/remove_extent.h @@ -23,6 +23,9 @@ struct remove_extent { using type _LIBCPP_NODEBUG = __remove_extent(_Tp); }; + +template +using __remove_extent_t = __remove_extent(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_extent {typedef _Tp type;}; @@ -30,10 +33,13 @@ {typedef _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]> {typedef _Tp type;}; + +template +using __remove_extent_t = typename remove_extent<_Tp>::type; #endif // __has_builtin(__remove_extent) #if _LIBCPP_STD_VER > 11 -template using remove_extent_t = typename remove_extent<_Tp>::type; +template using remove_extent_t = __remove_extent_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h --- a/libcxx/include/__type_traits/remove_pointer.h +++ b/libcxx/include/__type_traits/remove_pointer.h @@ -22,16 +22,22 @@ struct remove_pointer { using type _LIBCPP_NODEBUG = __remove_pointer(_Tp); }; + +template +using __remove_pointer_t = __remove_pointer(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; + +template +using __remove_pointer_t = typename remove_pointer<_Tp>::type; #endif // __has_builtin(__remove_pointer) #if _LIBCPP_STD_VER > 11 -template using remove_pointer_t = typename remove_pointer<_Tp>::type; +template using remove_pointer_t = __remove_pointer_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_reference.h b/libcxx/include/__type_traits/remove_reference.h --- a/libcxx/include/__type_traits/remove_reference.h +++ b/libcxx/include/__type_traits/remove_reference.h @@ -23,14 +23,20 @@ struct remove_reference { using type _LIBCPP_NODEBUG = __remove_reference_t(_Tp); }; + +template +using __libcpp_remove_reference_t = __remove_reference_t(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; + +template +using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type; #endif // __has_builtin(__remove_reference_t) #if _LIBCPP_STD_VER > 11 -template using remove_reference_t = typename remove_reference<_Tp>::type; +template using remove_reference_t = __libcpp_remove_reference_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/remove_volatile.h b/libcxx/include/__type_traits/remove_volatile.h --- a/libcxx/include/__type_traits/remove_volatile.h +++ b/libcxx/include/__type_traits/remove_volatile.h @@ -22,13 +22,19 @@ struct remove_volatile { using type _LIBCPP_NODEBUG = __remove_volatile(_Tp); }; + +template +using __remove_volatile_t = __remove_volatile(_Tp); #else template struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;}; template struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;}; + +template +using __remove_volatile_t = typename remove_volatile<_Tp>::type; #endif // __has_builtin(__remove_volatile) #if _LIBCPP_STD_VER > 11 -template using remove_volatile_t = typename remove_volatile<_Tp>::type; +template using remove_volatile_t = __remove_volatile_t<_Tp>; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__utility/forward.h b/libcxx/include/__utility/forward.h --- a/libcxx/include/__utility/forward.h +++ b/libcxx/include/__utility/forward.h @@ -22,13 +22,13 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&& -forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT { +forward(__libcpp_remove_reference_t<_Tp>& __t) _NOEXCEPT { return static_cast<_Tp&&>(__t); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&& -forward(typename remove_reference<_Tp>::type&& __t) _NOEXCEPT { +forward(__libcpp_remove_reference_t<_Tp>&& __t) _NOEXCEPT { static_assert(!is_lvalue_reference<_Tp>::value, "cannot forward an rvalue as an lvalue"); return static_cast<_Tp&&>(__t); } diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h --- a/libcxx/include/__utility/in_place.h +++ b/libcxx/include/__utility/in_place.h @@ -43,13 +43,13 @@ template struct __is_inplace_type_imp> : true_type {}; template -using __is_inplace_type = __is_inplace_type_imp<__uncvref_t<_Tp>>; +using __is_inplace_type = __is_inplace_type_imp<__remove_cvref_t<_Tp>>; template struct __is_inplace_index_imp : false_type {}; template struct __is_inplace_index_imp> : true_type {}; template -using __is_inplace_index = __is_inplace_index_imp<__uncvref_t<_Tp>>; +using __is_inplace_index = __is_inplace_index_imp<__remove_cvref_t<_Tp>>; #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__utility/move.h b/libcxx/include/__utility/move.h --- a/libcxx/include/__utility/move.h +++ b/libcxx/include/__utility/move.h @@ -20,9 +20,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename remove_reference<_Tp>::type&& +_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __libcpp_remove_reference_t<_Tp>&& move(_Tp&& __t) _NOEXCEPT { - typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up; + typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up; return static_cast<_Up&&>(__t); } diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -606,7 +606,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any const & __v) { - using _RawValueType = __uncvref_t<_ValueType>; + using _RawValueType = __remove_cvref_t<_ValueType>; static_assert(is_constructible<_ValueType, _RawValueType const &>::value, "ValueType is required to be a const lvalue reference " "or a CopyConstructible type"); @@ -621,7 +621,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any & __v) { - using _RawValueType = __uncvref_t<_ValueType>; + using _RawValueType = __remove_cvref_t<_ValueType>; static_assert(is_constructible<_ValueType, _RawValueType &>::value, "ValueType is required to be an lvalue reference " "or a CopyConstructible type"); @@ -636,7 +636,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any && __v) { - using _RawValueType = __uncvref_t<_ValueType>; + using _RawValueType = __remove_cvref_t<_ValueType>; static_assert(is_constructible<_ValueType, _RawValueType>::value, "ValueType is required to be an rvalue reference " "or a CopyConstructible type"); diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -948,13 +948,13 @@ template _LIBCPP_INLINE_VISIBILITY _Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) _NOEXCEPT { - using __ptr_type = typename remove_const__a_value)>::type*; + using __ptr_type = __remove_const_t__a_value)>*; return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order)); } template _LIBCPP_INLINE_VISIBILITY _Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const* __a, memory_order __order) _NOEXCEPT { - using __ptr_type = typename remove_const__a_value)>::type*; + using __ptr_type = __remove_const_t__a_value)>*; return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order)); } @@ -1806,28 +1806,28 @@ _LIBCPP_INLINE_VISIBILITY _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT { // __atomic_fetch_add accepts function pointers, guard against them. - static_assert(!is_function::type>::value, "Pointer to function isn't allowed"); + static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed"); return __cxx_atomic_fetch_add(&this->__a_, __op, __m); } _LIBCPP_INLINE_VISIBILITY _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT { // __atomic_fetch_add accepts function pointers, guard against them. - static_assert(!is_function::type>::value, "Pointer to function isn't allowed"); + static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed"); return __cxx_atomic_fetch_add(&this->__a_, __op, __m); } _LIBCPP_INLINE_VISIBILITY _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT { // __atomic_fetch_add accepts function pointers, guard against them. - static_assert(!is_function::type>::value, "Pointer to function isn't allowed"); + static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed"); return __cxx_atomic_fetch_sub(&this->__a_, __op, __m); } _LIBCPP_INLINE_VISIBILITY _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT { // __atomic_fetch_add accepts function pointers, guard against them. - static_assert(!is_function::type>::value, "Pointer to function isn't allowed"); + static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed"); return __cxx_atomic_fetch_sub(&this->__a_, __op, __m); } diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine --- a/libcxx/include/experimental/coroutine +++ b/libcxx/include/experimental/coroutine @@ -241,7 +241,7 @@ _LIBCPP_INLINE_VISIBILITY static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT { - typedef typename remove_cv<_Promise>::type _RawPromise; + typedef __remove_cv_t<_Promise> _RawPromise; coroutine_handle __tmp; __tmp.__handle_ = __builtin_coro_promise( _VSTD::addressof(const_cast<_RawPromise&>(__promise)), diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -145,9 +145,9 @@ "Instantiation of propagate_const with an array type is ill-formed."); static_assert(!is_reference<_Tp>::value, "Instantiation of propagate_const with a reference type is ill-formed."); - static_assert(!(is_pointer<_Tp>::value && is_function::type>::value), + static_assert(!(is_pointer<_Tp>::value && is_function<__remove_pointer_t<_Tp> >::value), "Instantiation of propagate_const with a function-pointer type is ill-formed."); - static_assert(!(is_pointer<_Tp>::value && is_same::type>::type, void>::value), + static_assert(!(is_pointer<_Tp>::value && is_same<__remove_cv_t<__remove_pointer_t<_Tp> >, void>::value), "Instantiation of propagate_const with a pointer to (possibly cv-qualified) void is ill-formed."); private: diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -1062,7 +1062,7 @@ : std::integral_constant { static_assert( std::is_arithmetic<_Tp>::value && - !std::is_same::type, bool>::value, + !std::is_same<__remove_const_t<_Tp>, bool>::value, "Element type should be vectorizable"); }; @@ -1304,7 +1304,7 @@ public: const_where_expression(const const_where_expression&) = delete; const_where_expression& operator=(const const_where_expression&) = delete; - typename remove_const<_Tp>::type operator-() const&&; + __remove_const_t<_Tp> operator-() const&&; template void copy_to(_Up*, _Flags) const&&; }; @@ -1371,8 +1371,8 @@ __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()) || (!std::is_arithmetic<_Up>::value && std::is_convertible<_Up, _Tp>::value) || - std::is_same::type, int>::value || - (std::is_same::type, + std::is_same<__remove_const_t<_Up>, int>::value || + (std::is_same<__remove_const_t<_Up>, unsigned int>::value && std::is_unsigned<_Tp>::value); } diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -382,7 +382,7 @@ typedef std::pair value_type; typedef typename _HashIterator::difference_type difference_type; typedef value_type& reference; - typedef typename std::__rebind_pointer::type + typedef std::__rebind_pointer_t pointer; _LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {} @@ -427,7 +427,7 @@ typedef std::pair value_type; typedef typename _HashIterator::difference_type difference_type; typedef const value_type& reference; - typedef typename std::__rebind_pointer::type + typedef std::__rebind_pointer_t pointer; _LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {} diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -239,14 +239,13 @@ template struct __forward_node_traits { - typedef typename remove_cv< - typename pointer_traits<_NodePtr>::element_type>::type __node; + typedef __remove_cv_t< + typename pointer_traits<_NodePtr>::element_type> __node; typedef typename __forward_list_node_value_type<__node>::type __node_value_type; typedef _NodePtr __node_pointer; typedef __forward_begin_node<_NodePtr> __begin_node; - typedef typename __rebind_pointer<_NodePtr, __begin_node>::type - __begin_node_pointer; - typedef typename __rebind_pointer<_NodePtr, void>::type __void_pointer; + typedef __rebind_pointer_t<_NodePtr, __begin_node> __begin_node_pointer; + typedef __rebind_pointer_t<_NodePtr, void> __void_pointer; #if defined(_LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB) typedef __begin_node_pointer __iter_node_pointer; @@ -278,7 +277,7 @@ struct __forward_begin_node { typedef _NodePtr pointer; - typedef typename __rebind_pointer<_NodePtr, __forward_begin_node>::type __begin_node_pointer; + typedef __rebind_pointer_t<_NodePtr, __forward_begin_node> __begin_node_pointer; pointer __next_; @@ -294,7 +293,7 @@ struct _LIBCPP_HIDDEN __begin_node_of { typedef __forward_begin_node< - typename __rebind_pointer<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> >::type + __rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > > type; }; @@ -353,7 +352,7 @@ typedef value_type& reference; typedef typename pointer_traits<__node_pointer>::difference_type difference_type; - typedef typename __rebind_pointer<__node_pointer, value_type>::type pointer; + typedef __rebind_pointer_t<__node_pointer, value_type> pointer; _LIBCPP_INLINE_VISIBILITY __forward_list_iterator() _NOEXCEPT : __ptr_(nullptr) {} @@ -434,7 +433,7 @@ typedef const value_type& reference; typedef typename pointer_traits<__node_pointer>::difference_type difference_type; - typedef typename __rebind_pointer<__node_pointer, const value_type>::type + typedef __rebind_pointer_t<__node_pointer, const value_type> pointer; _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -1754,7 +1754,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f) : __f_(nullptr) { - typedef typename remove_reference::type>::type _FR; + typedef __libcpp_remove_reference_t::type> _FR; typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF; if (sizeof(_FF) <= sizeof(__buf_)) { @@ -1778,7 +1778,7 @@ allocator_arg_t, const _Alloc& __a0, _Fp&& __f) : __f_(nullptr) { - typedef typename remove_reference::type>::type _FR; + typedef __libcpp_remove_reference_t::type> _FR; typedef __packaged_task_func<_FR, _Alloc, _Rp(_ArgTypes...)> _FF; if (sizeof(_FF) <= sizeof(__buf_)) { @@ -1891,11 +1891,11 @@ _LIBCPP_INLINE_VISIBILITY packaged_task() _NOEXCEPT : __p_(nullptr) {} template , packaged_task>::value> > + class = __enable_if_t, packaged_task>::value> > _LIBCPP_INLINE_VISIBILITY explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {} template , packaged_task>::value> > + class = __enable_if_t, packaged_task>::value> > _LIBCPP_INLINE_VISIBILITY packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), @@ -2006,11 +2006,11 @@ _LIBCPP_INLINE_VISIBILITY packaged_task() _NOEXCEPT : __p_(nullptr) {} template , packaged_task>::value> > + class = __enable_if_t, packaged_task>::value> > _LIBCPP_INLINE_VISIBILITY explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {} template , packaged_task>::value> > + class = __enable_if_t, packaged_task>::value> > _LIBCPP_INLINE_VISIBILITY packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), diff --git a/libcxx/include/limits b/libcxx/include/limits --- a/libcxx/include/limits +++ b/libcxx/include/limits @@ -451,9 +451,9 @@ template class _LIBCPP_TEMPLATE_VIS numeric_limits - : private __libcpp_numeric_limits::type> + : private __libcpp_numeric_limits<__remove_cv_t<_Tp> > { - typedef __libcpp_numeric_limits::type> __base; + typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base; typedef typename __base::type type; public: static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -237,9 +237,9 @@ template struct __list_node_pointer_traits { - typedef typename __rebind_pointer<_VoidPtr, __list_node<_Tp, _VoidPtr> >::type + typedef __rebind_pointer_t<_VoidPtr, __list_node<_Tp, _VoidPtr> > __node_pointer; - typedef typename __rebind_pointer<_VoidPtr, __list_node_base<_Tp, _VoidPtr> >::type + typedef __rebind_pointer_t<_VoidPtr, __list_node_base<_Tp, _VoidPtr> > __base_pointer; #if defined(_LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB) @@ -340,7 +340,7 @@ typedef bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef value_type& reference; - typedef typename __rebind_pointer<_VoidPtr, value_type>::type pointer; + typedef __rebind_pointer_t<_VoidPtr, value_type> pointer; typedef typename pointer_traits::difference_type difference_type; _LIBCPP_INLINE_VISIBILITY @@ -448,7 +448,7 @@ typedef bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef const value_type& reference; - typedef typename __rebind_pointer<_VoidPtr, const value_type>::type pointer; + typedef __rebind_pointer_t<_VoidPtr, const value_type> pointer; typedef typename pointer_traits::difference_type difference_type; _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -756,11 +756,11 @@ { if (__a != __a_end) { - typename remove_reference::type __save_errno = errno; + __libcpp_remove_reference_t __save_errno = errno; errno = 0; char *__p2; long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); - typename remove_reference::type __current_errno = errno; + __libcpp_remove_reference_t __current_errno = errno; if (__current_errno == 0) errno = __save_errno; if (__p2 != __a_end) @@ -796,11 +796,11 @@ __err = ios_base::failbit; return 0; } - typename remove_reference::type __save_errno = errno; + __libcpp_remove_reference_t __save_errno = errno; errno = 0; char *__p2; unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); - typename remove_reference::type __current_errno = errno; + __libcpp_remove_reference_t __current_errno = errno; if (__current_errno == 0) errno = __save_errno; if (__p2 != __a_end) @@ -850,11 +850,11 @@ { if (__a != __a_end) { - typename remove_reference::type __save_errno = errno; + __libcpp_remove_reference_t __save_errno = errno; errno = 0; char *__p2; _Tp __ld = __do_strtod<_Tp>(__a, &__p2); - typename remove_reference::type __current_errno = errno; + __libcpp_remove_reference_t __current_errno = errno; if (__current_errno == 0) errno = __save_errno; if (__p2 != __a_end) diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -365,7 +365,7 @@ _LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT { static_assert (!(is_function<_Tp>::value), "can't launder functions" ); - static_assert (!(is_same::type>::value), "can't launder cv-void" ); + static_assert (!(is_same >::value), "can't launder cv-void" ); return __builtin_launder(__p); } diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -417,14 +417,14 @@ template static constexpr bool __can_bind_reference() { - using _RawUp = typename remove_reference<_Up>::type; + using _RawUp = __libcpp_remove_reference_t<_Up>; using _UpPtr = _RawUp*; - using _RawTp = typename remove_reference<_Tp>::type; + using _RawTp = __libcpp_remove_reference_t<_Tp>; using _TpPtr = _RawTp*; using _CheckLValueArg = integral_constant::value && is_convertible<_UpPtr, _TpPtr>::value) || is_same<_RawUp, reference_wrapper<_RawTp>>::value - || is_same<_RawUp, reference_wrapper::type>>::value + || is_same<_RawUp, reference_wrapper<__remove_const_t<_RawTp>>>::value >; return (is_lvalue_reference<_Tp>::value && _CheckLValueArg::value) || (is_rvalue_reference<_Tp>::value && !is_lvalue_reference<_Up>::value && @@ -652,9 +652,9 @@ private: // Disable the reference extension using this static assert. - static_assert(!is_same_v<__uncvref_t, in_place_t>, + static_assert(!is_same_v<__remove_cvref_t, in_place_t>, "instantiation of optional with in_place_t is ill-formed"); - static_assert(!is_same_v<__uncvref_t, nullopt_t>, + static_assert(!is_same_v<__remove_cvref_t, nullopt_t>, "instantiation of optional with nullopt_t is ill-formed"); static_assert(!is_reference_v, "instantiation of optional with a reference type is ill-formed"); @@ -679,8 +679,8 @@ }; template using _CheckOptionalArgsCtor = _If< - _IsNotSame<__uncvref_t<_Up>, in_place_t>::value && - _IsNotSame<__uncvref_t<_Up>, optional>::value, + _IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value && + _IsNotSame<__remove_cvref_t<_Up>, optional>::value, _CheckOptionalArgsConstructor, __check_tuple_constructor_fail >; @@ -840,9 +840,9 @@ template , optional>, + _IsNotSame<__remove_cvref_t<_Up>, optional>, _Or< - _IsNotSame<__uncvref_t<_Up>, value_type>, + _IsNotSame<__remove_cvref_t<_Up>, value_type>, _Not> >, is_constructible, diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -379,10 +379,10 @@ template struct __outermost<_Alloc, true> { - typedef typename remove_reference + typedef __libcpp_remove_reference_t < decltype(declval<_Alloc>().outer_allocator()) - >::type _OuterAlloc; + > _OuterAlloc; typedef typename __outermost<_OuterAlloc>::type type; _LIBCPP_INLINE_VISIBILITY type& operator()(_Alloc& __a) const _NOEXCEPT diff --git a/libcxx/include/thread b/libcxx/include/thread --- a/libcxx/include/thread +++ b/libcxx/include/thread @@ -236,7 +236,7 @@ thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {} #ifndef _LIBCPP_CXX03_LANG template , thread>::value> > + class = __enable_if_t, thread>::value> > _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit thread(_Fp&& __f, _Args&&... __args); #else // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -308,7 +308,7 @@ template , __tuple_leaf>, + _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value > @@ -387,7 +387,7 @@ template , __tuple_leaf>, + _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value > @@ -674,7 +674,7 @@ // tuple(U&& ...) constructors (including allocator_arg_t variants) template struct _IsThisTuple : false_type { }; - template struct _IsThisTuple<_Up> : is_same<__uncvref_t<_Up>, tuple> { }; + template struct _IsThisTuple<_Up> : is_same<__remove_cvref_t<_Up>, tuple> { }; template struct _EnableUTypesCtor : _And< @@ -769,7 +769,7 @@ // tuple(const tuple&) constructors (including allocator_arg_t variants) - template , class = void> + template , class = void> struct _EnableCtorFromUTypesTuple : false_type {}; template @@ -921,7 +921,7 @@ // tuple(const pair&) constructors (including allocator_arg_t variants) - template