diff --git a/libcxx/include/__algorithm/binary_search.h b/libcxx/include/__algorithm/binary_search.h --- a/libcxx/include/__algorithm/binary_search.h +++ b/libcxx/include/__algorithm/binary_search.h @@ -27,8 +27,7 @@ bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) { - using _Comp_ref = typename __comp_ref_type<_Compare>::type; - __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value, __comp); + __first = std::lower_bound<_ForwardIterator, _Tp, __comp_ref_type<_Compare> >(__first, __last, __value, __comp); return __first != __last && !__comp(__value, *__first); } diff --git a/libcxx/include/__algorithm/comp_ref_type.h b/libcxx/include/__algorithm/comp_ref_type.h --- a/libcxx/include/__algorithm/comp_ref_type.h +++ b/libcxx/include/__algorithm/comp_ref_type.h @@ -64,16 +64,15 @@ void __do_compare_assert(long, _LHS &, _RHS &) {} }; -template -struct __comp_ref_type { - // Pass the comparator by lvalue reference. Or in debug mode, using a - // debugging wrapper that stores a reference. +// Pass the comparator by lvalue reference. Or in debug mode, using a +// debugging wrapper that stores a reference. #ifdef _LIBCPP_ENABLE_DEBUG_MODE - typedef __debug_less<_Comp> type; +template +using __comp_ref_type = __debug_less<_Comp>; #else - typedef _Comp& type; +template +using __comp_ref_type = _Comp&; #endif -}; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h --- a/libcxx/include/__algorithm/equal_range.h +++ b/libcxx/include/__algorithm/equal_range.h @@ -64,9 +64,12 @@ "The comparator has to be callable"); static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible"); - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; return std::__equal_range<_ClassicAlgPolicy>( - std::move(__first), std::move(__last), __value, static_cast<_Comp_ref>(__comp), std::__identity()); + std::move(__first), + std::move(__last), + __value, + static_cast<__comp_ref_type<_Compare> >(__comp), + std::__identity()); } template diff --git a/libcxx/include/__algorithm/includes.h b/libcxx/include/__algorithm/includes.h --- a/libcxx/include/__algorithm/includes.h +++ b/libcxx/include/__algorithm/includes.h @@ -48,10 +48,14 @@ static_assert(__is_callable<_Compare, decltype(*__first1), decltype(*__first2)>::value, "Comparator has to be callable"); - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; return std::__includes( - std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), - static_cast<_Comp_ref>(__comp), __identity(), __identity()); + std::move(__first1), + std::move(__last1), + std::move(__first2), + std::move(__last2), + static_cast<__comp_ref_type<_Compare> >(__comp), + __identity(), + __identity()); } template diff --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h --- a/libcxx/include/__algorithm/inplace_merge.h +++ b/libcxx/include/__algorithm/inplace_merge.h @@ -237,9 +237,8 @@ template inline _LIBCPP_HIDE_FROM_ABI void inplace_merge( _BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; std::__inplace_merge<_ClassicAlgPolicy>( - std::move(__first), std::move(__middle), std::move(__last), static_cast<_Comp_ref>(__comp)); + std::move(__first), std::move(__middle), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)); } template diff --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h --- a/libcxx/include/__algorithm/is_heap.h +++ b/libcxx/include/__algorithm/is_heap.h @@ -27,8 +27,7 @@ bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__is_heap_until(__first, __last, static_cast<_Comp_ref>(__comp)) == __last; + return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp)) == __last; } template diff --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h --- a/libcxx/include/__algorithm/is_heap_until.h +++ b/libcxx/include/__algorithm/is_heap_until.h @@ -51,8 +51,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__is_heap_until(__first, __last, static_cast<_Comp_ref>(__comp)); + return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp)); } template diff --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h --- a/libcxx/include/__algorithm/is_sorted.h +++ b/libcxx/include/__algorithm/is_sorted.h @@ -27,8 +27,7 @@ bool is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last; + return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last; } template diff --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h --- a/libcxx/include/__algorithm/is_sorted_until.h +++ b/libcxx/include/__algorithm/is_sorted_until.h @@ -41,8 +41,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp); + return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp); } template diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h --- a/libcxx/include/__algorithm/lexicographical_compare.h +++ b/libcxx/include/__algorithm/lexicographical_compare.h @@ -42,8 +42,7 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); + return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp); } template diff --git a/libcxx/include/__algorithm/make_heap.h b/libcxx/include/__algorithm/make_heap.h --- a/libcxx/include/__algorithm/make_heap.h +++ b/libcxx/include/__algorithm/make_heap.h @@ -26,8 +26,7 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) { - using _CompRef = typename __comp_ref_type<_Compare>::type; - _CompRef __comp_ref = __comp; + __comp_ref_type<_Compare> __comp_ref = __comp; using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; difference_type __n = __last - __first; diff --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h --- a/libcxx/include/__algorithm/max.h +++ b/libcxx/include/__algorithm/max.h @@ -50,8 +50,7 @@ _Tp max(initializer_list<_Tp> __t, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return *_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp); + return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp); } template diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h --- a/libcxx/include/__algorithm/max_element.h +++ b/libcxx/include/__algorithm/max_element.h @@ -40,8 +40,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__max_element<_Comp_ref>(__first, __last, __comp); + return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp); } diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h --- a/libcxx/include/__algorithm/merge.h +++ b/libcxx/include/__algorithm/merge.h @@ -51,8 +51,7 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp); } template diff --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h --- a/libcxx/include/__algorithm/min.h +++ b/libcxx/include/__algorithm/min.h @@ -50,8 +50,7 @@ _Tp min(initializer_list<_Tp> __t, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return *_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp); + return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp); } template diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h --- a/libcxx/include/__algorithm/min_element.h +++ b/libcxx/include/__algorithm/min_element.h @@ -54,8 +54,7 @@ static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__first)>::value, "The comparator has to be callable"); - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__min_element<_Comp_ref>(std::move(__first), std::move(__last), __comp); + return std::__min_element<__comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp); } template diff --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h --- a/libcxx/include/__algorithm/next_permutation.h +++ b/libcxx/include/__algorithm/next_permutation.h @@ -60,9 +60,8 @@ bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { - using _Comp_ref = typename __comp_ref_type<_Compare>::type; return std::__next_permutation<_ClassicAlgPolicy>( - std::move(__first), std::move(__last), static_cast<_Comp_ref>(__comp)).second; + std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second; } template diff --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h --- a/libcxx/include/__algorithm/nth_element.h +++ b/libcxx/include/__algorithm/nth_element.h @@ -231,8 +231,7 @@ std::__debug_randomize_range<_AlgPolicy>(__first, __last); - using _Comp_ref = typename __comp_ref_type<_Compare>::type; - std::__nth_element<_AlgPolicy, _Comp_ref>(__first, __nth, __last, __comp); + std::__nth_element<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __nth, __last, __comp); std::__debug_randomize_range<_AlgPolicy>(__first, __nth); if (__nth != __last) { diff --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h --- a/libcxx/include/__algorithm/partial_sort.h +++ b/libcxx/include/__algorithm/partial_sort.h @@ -63,8 +63,8 @@ std::__debug_randomize_range<_AlgPolicy>(__first, __last); - using _Comp_ref = typename __comp_ref_type<_Compare>::type; - auto __last_iter = std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<_Comp_ref>(__comp)); + auto __last_iter = + std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<__comp_ref_type<_Compare> >(__comp)); std::__debug_randomize_range<_AlgPolicy>(__middle, __last); diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h --- a/libcxx/include/__algorithm/partial_sort_copy.h +++ b/libcxx/include/__algorithm/partial_sort_copy.h @@ -68,9 +68,8 @@ static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__result_first)>::value, "Comparator has to be callable"); - using _Comp_ref = typename __comp_ref_type<_Compare>::type; auto __result = std::__partial_sort_copy<_ClassicAlgPolicy>(__first, __last, __result_first, __result_last, - static_cast<_Comp_ref>(__comp), __identity(), __identity()); + static_cast<__comp_ref_type<_Compare> >(__comp), __identity(), __identity()); return __result.second; } diff --git a/libcxx/include/__algorithm/pop_heap.h b/libcxx/include/__algorithm/pop_heap.h --- a/libcxx/include/__algorithm/pop_heap.h +++ b/libcxx/include/__algorithm/pop_heap.h @@ -32,8 +32,7 @@ typename iterator_traits<_RandomAccessIterator>::difference_type __len) { _LIBCPP_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty"); - using _CompRef = typename __comp_ref_type<_Compare>::type; - _CompRef __comp_ref = __comp; + __comp_ref_type<_Compare> __comp_ref = __comp; using value_type = typename iterator_traits<_RandomAccessIterator>::value_type; if (__len > 1) { diff --git a/libcxx/include/__algorithm/prev_permutation.h b/libcxx/include/__algorithm/prev_permutation.h --- a/libcxx/include/__algorithm/prev_permutation.h +++ b/libcxx/include/__algorithm/prev_permutation.h @@ -61,9 +61,8 @@ bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { - using _Comp_ref = typename __comp_ref_type<_Compare>::type; return std::__prev_permutation<_ClassicAlgPolicy>( - std::move(__first), std::move(__last), static_cast<_Comp_ref>(__comp)).second; + std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second; } template diff --git a/libcxx/include/__algorithm/push_heap.h b/libcxx/include/__algorithm/push_heap.h --- a/libcxx/include/__algorithm/push_heap.h +++ b/libcxx/include/__algorithm/push_heap.h @@ -52,9 +52,8 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { - using _CompRef = typename __comp_ref_type<_Compare>::type; typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first; - std::__sift_up<_AlgPolicy, _CompRef>(std::move(__first), std::move(__last), __comp, __len); + std::__sift_up<_AlgPolicy, __comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp, __len); } template 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 @@ -53,8 +53,8 @@ _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp).second; + return std::__set_difference<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp) + .second; } template diff --git a/libcxx/include/__algorithm/set_intersection.h b/libcxx/include/__algorithm/set_intersection.h --- a/libcxx/include/__algorithm/set_intersection.h +++ b/libcxx/include/__algorithm/set_intersection.h @@ -66,8 +66,7 @@ _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__set_intersection<_ClassicAlgPolicy, _Comp_ref>( + return std::__set_intersection<_ClassicAlgPolicy, __comp_ref_type<_Compare> >( std::move(__first1), std::move(__last1), std::move(__first2), diff --git a/libcxx/include/__algorithm/set_symmetric_difference.h b/libcxx/include/__algorithm/set_symmetric_difference.h --- a/libcxx/include/__algorithm/set_symmetric_difference.h +++ b/libcxx/include/__algorithm/set_symmetric_difference.h @@ -72,8 +72,7 @@ _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__set_symmetric_difference<_Comp_ref>( + return std::__set_symmetric_difference<__comp_ref_type<_Compare> >( std::move(__first1), std::move(__last1), std::move(__first2), diff --git a/libcxx/include/__algorithm/set_union.h b/libcxx/include/__algorithm/set_union.h --- a/libcxx/include/__algorithm/set_union.h +++ b/libcxx/include/__algorithm/set_union.h @@ -68,8 +68,7 @@ _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { - typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return std::__set_union<_Comp_ref>( + return std::__set_union<__comp_ref_type<_Compare> >( std::move(__first1), std::move(__last1), std::move(__first2), diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h --- a/libcxx/include/__algorithm/sort.h +++ b/libcxx/include/__algorithm/sort.h @@ -683,7 +683,7 @@ void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) { std::__debug_randomize_range<_AlgPolicy>(__first, __last); - using _Comp_ref = typename __comp_ref_type<_Comp>::type; + using _Comp_ref = __comp_ref_type<_Comp>; if (__libcpp_is_constant_evaluated()) { std::__partial_sort<_AlgPolicy>(__first, __last, __last, __comp); diff --git a/libcxx/include/__algorithm/sort_heap.h b/libcxx/include/__algorithm/sort_heap.h --- a/libcxx/include/__algorithm/sort_heap.h +++ b/libcxx/include/__algorithm/sort_heap.h @@ -27,8 +27,7 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) { - using _CompRef = typename __comp_ref_type<_Compare>::type; - _CompRef __comp_ref = __comp; + __comp_ref_type<_Compare> __comp_ref = __comp; using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n) diff --git a/libcxx/include/__algorithm/stable_sort.h b/libcxx/include/__algorithm/stable_sort.h --- a/libcxx/include/__algorithm/stable_sort.h +++ b/libcxx/include/__algorithm/stable_sort.h @@ -227,8 +227,7 @@ __h.reset(__buf.first); } - using _Comp_ref = typename __comp_ref_type<_Compare>::type; - std::__stable_sort<_AlgPolicy, _Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); + std::__stable_sort<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __last, __comp, __len, __buf.first, __buf.second); } template diff --git a/libcxx/include/__algorithm/unique_copy.h b/libcxx/include/__algorithm/unique_copy.h --- a/libcxx/include/__algorithm/unique_copy.h +++ b/libcxx/include/__algorithm/unique_copy.h @@ -97,15 +97,15 @@ template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) { - using __algo_tag = typename conditional< + using __algo_tag = __conditional_t< is_base_of::iterator_category>::value, __unique_copy_tags::__reread_from_input_tag, - typename conditional< + __conditional_t< is_base_of::iterator_category>::value && is_same< typename iterator_traits<_InputIterator>::value_type, typename iterator_traits<_OutputIterator>::value_type>::value, __unique_copy_tags::__reread_from_output_tag, - __unique_copy_tags::__read_from_tmp_value_tag>::type >::type; + __unique_copy_tags::__read_from_tmp_value_tag> >; return std::__unique_copy<_ClassicAlgPolicy>( std::move(__first), std::move(__last), std::move(__result), __pred, __algo_tag()) .second; diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -1115,16 +1115,16 @@ typedef bool value_type; typedef __bit_iterator pointer; #ifndef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL - typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference; + typedef __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> > reference; #else - using reference = typename conditional<_IsConst, bool, __bit_reference<_Cp> >::type; + using reference = __conditional_t<_IsConst, bool, __bit_reference<_Cp> >; #endif typedef random_access_iterator_tag iterator_category; private: typedef typename _Cp::__storage_type __storage_type; - typedef typename conditional<_IsConst, typename _Cp::__const_storage_pointer, - typename _Cp::__storage_pointer>::type __storage_pointer; + typedef __conditional_t<_IsConst, typename _Cp::__const_storage_pointer, typename _Cp::__storage_pointer> + __storage_pointer; static const unsigned __bits_per_word = _Cp::__bits_per_word; __storage_pointer __seg_; @@ -1159,8 +1159,8 @@ } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator*() const _NOEXCEPT { - return typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> > - ::type(__seg_, __storage_type(1) << __ctz_); + return __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >( + __seg_, __storage_type(1) << __ctz_); } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator++() diff --git a/libcxx/include/__coroutine/coroutine_traits.h b/libcxx/include/__coroutine/coroutine_traits.h --- a/libcxx/include/__coroutine/coroutine_traits.h +++ b/libcxx/include/__coroutine/coroutine_traits.h @@ -35,7 +35,7 @@ template struct __coroutine_traits_sfinae< - _Tp, typename __void_t::type> + _Tp, __void_t > { using promise_type = typename _Tp::promise_type; }; 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 @@ -676,8 +676,7 @@ // Used to choose between perfect forwarding or pass-by-value. Pass-by-value is // faster for types that can be passed in registers. template -using __fast_forward = - typename conditional::value, _Tp, _Tp&&>::type; +using __fast_forward = __conditional_t::value, _Tp, _Tp&&>; // __policy_invoker calls an instance of __alloc_func held in __policy_storage. 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 @@ -406,10 +406,10 @@ // or incomplete array types as required by the standard. using _Result = decltype(__try_call<_Fp, _Args...>(0)); - using type = typename conditional< + using type = __conditional_t< _IsNotSame<_Result, __nat>::value, - typename conditional< is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >::type, - false_type >::type; + __conditional_t::value, true_type, __is_core_convertible<_Result, _Ret> >, + false_type>; static const bool value = type::value; }; template diff --git a/libcxx/include/__functional/is_transparent.h b/libcxx/include/__functional/is_transparent.h --- a/libcxx/include/__functional/is_transparent.h +++ b/libcxx/include/__functional/is_transparent.h @@ -25,8 +25,7 @@ struct __is_transparent : false_type {}; template -struct __is_transparent<_Tp, _Up, - typename __void_t::type> +struct __is_transparent<_Tp, _Up, __void_t > : true_type {}; #endif diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -73,10 +73,7 @@ #if defined(_LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB) typedef __node_base_pointer __next_pointer; #else - typedef typename conditional< - is_pointer<__node_pointer>::value, - __node_base_pointer, - __node_pointer>::type __next_pointer; + typedef __conditional_t::value, __node_base_pointer, __node_pointer> __next_pointer; #endif __next_pointer __next_; 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 @@ -108,11 +108,11 @@ { private: template static false_type __test(...); - template static true_type __test(typename __void_t::type* = 0, - typename __void_t::type* = 0, - typename __void_t::type* = 0, - typename __void_t::type* = 0, - typename __void_t::type* = 0); + template static true_type __test(__void_t* = nullptr, + __void_t* = nullptr, + __void_t* = nullptr, + __void_t* = nullptr, + __void_t* = nullptr); public: static const bool value = decltype(__test<_Tp>(0,0,0,0,0))::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 @@ -28,7 +28,7 @@ #define _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY) \ template struct NAME : false_type { }; \ - template struct NAME<_Tp, typename __void_t::type> : true_type { } + template struct NAME<_Tp, __void_t > : true_type { } // __pointer _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer); @@ -152,9 +152,7 @@ template struct __has_rebind_other : false_type { }; template -struct __has_rebind_other<_Tp, _Up, typename __void_t< - typename _Tp::template rebind<_Up>::other ->::type> : true_type { }; +struct __has_rebind_other<_Tp, _Up, __void_t::other> > : true_type { }; template ::value> struct __allocator_traits_rebind { 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 @@ -25,8 +25,7 @@ struct __has_element_type : false_type {}; template -struct __has_element_type<_Tp, - typename __void_t::type> : true_type {}; +struct __has_element_type<_Tp, __void_t > : true_type {}; template ::value> struct __pointer_traits_element_type; @@ -53,8 +52,7 @@ struct __has_difference_type : false_type {}; template -struct __has_difference_type<_Tp, - typename __void_t::type> : true_type {}; +struct __has_difference_type<_Tp, __void_t > : true_type {}; template ::value> struct __pointer_traits_difference_type @@ -124,8 +122,7 @@ struct __nat {}; public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - static pointer pointer_to(typename conditional::value, - __nat, element_type>::type& __r) + static pointer pointer_to(__conditional_t::value, __nat, element_type>& __r) {return pointer::pointer_to(__r);} }; @@ -146,8 +143,7 @@ struct __nat {}; public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - static pointer pointer_to(typename conditional::value, - __nat, element_type>::type& __r) _NOEXCEPT + static pointer pointer_to(__conditional_t::value, __nat, element_type>& __r) _NOEXCEPT {return _VSTD::addressof(__r);} }; diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h --- a/libcxx/include/__random/independent_bits_engine.h +++ b/libcxx/include/__random/independent_bits_engine.h @@ -51,12 +51,8 @@ static_assert(__w <= _Dt, "independent_bits_engine invalid parameters"); typedef typename _Engine::result_type _Engine_result_type; - typedef typename conditional - < - sizeof(_Engine_result_type) <= sizeof(result_type), - result_type, - _Engine_result_type - >::type _Working_result_type; + typedef __conditional_t + _Working_result_type; #ifdef _LIBCPP_CXX03_LANG static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min + _Working_result_type(1); diff --git a/libcxx/include/__random/log2.h b/libcxx/include/__random/log2.h --- a/libcxx/include/__random/log2.h +++ b/libcxx/include/__random/log2.h @@ -58,15 +58,12 @@ { static const size_t value = __log2_imp< #ifndef _LIBCPP_HAS_NO_INT128 - typename conditional< - sizeof(_UIntType) <= sizeof(unsigned long long), - unsigned long long, - __uint128_t - >::type, + __conditional_t, #else unsigned long long, #endif // _LIBCPP_HAS_NO_INT128 - _Xp, sizeof(_UIntType) * __CHAR_BIT__ - 1>::value; + _Xp, + sizeof(_UIntType) * __CHAR_BIT__ - 1>::value; }; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__random/uniform_int_distribution.h b/libcxx/include/__random/uniform_int_distribution.h --- a/libcxx/include/__random/uniform_int_distribution.h +++ b/libcxx/include/__random/uniform_int_distribution.h @@ -38,12 +38,8 @@ private: typedef typename _Engine::result_type _Engine_result_type; - typedef typename conditional - < - sizeof(_Engine_result_type) <= sizeof(result_type), - result_type, - _Engine_result_type - >::type _Working_result_type; + typedef __conditional_t + _Working_result_type; _Engine& __e_; size_t __w_; @@ -237,8 +233,8 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { static_assert(__libcpp_random_is_valid_urng<_URNG>::value, ""); - typedef typename conditional >::type _UIntType; + typedef __conditional_t > + _UIntType; const _UIntType _Rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1); if (_Rp == 1) return __p.a(); diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -647,10 +647,8 @@ #if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB) typedef __end_node_pointer __parent_pointer; #else - typedef typename conditional< - is_pointer<__end_node_pointer>::value, - __end_node_pointer, - __node_base_pointer>::type __parent_pointer; + typedef __conditional_t< is_pointer<__end_node_pointer>::value, __end_node_pointer, __node_base_pointer> + __parent_pointer; #endif private: @@ -696,10 +694,8 @@ #if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB) typedef typename __base::__end_node_pointer __iter_pointer; #else - typedef typename conditional< - is_pointer<__node_pointer>::value, - typename __base::__end_node_pointer, - __node_pointer>::type __iter_pointer; + typedef __conditional_t< is_pointer<__node_pointer>::value, typename __base::__end_node_pointer, __node_pointer> + __iter_pointer; #endif private: static_assert(!is_const<__node_type>::value, diff --git a/libcxx/include/__type_traits/aligned_storage.h b/libcxx/include/__type_traits/aligned_storage.h --- a/libcxx/include/__type_traits/aligned_storage.h +++ b/libcxx/include/__type_traits/aligned_storage.h @@ -54,21 +54,13 @@ template struct __find_pod<__type_list<_Hp, __nat>, _Align> { - typedef typename conditional< - _Align == _Hp::value, - typename _Hp::type, - __fallback_overaligned<_Align> - >::type type; + typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, __fallback_overaligned<_Align> > type; }; template struct __find_pod<__type_list<_Hp, _Tp>, _Align> { - typedef typename conditional< - _Align == _Hp::value, - typename _Hp::type, - typename __find_pod<_Tp, _Align>::type - >::type type; + typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, typename __find_pod<_Tp, _Align>::type> type; }; template struct __find_max_align; 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 @@ -28,16 +28,14 @@ struct __extract_key_self_tag {}; struct __extract_key_first_tag {}; -template > +template > struct __can_extract_key - : conditional<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, - __extract_key_fail_tag>::type {}; + : __conditional_t<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag> {}; template struct __can_extract_key<_Pair, _Key, pair<_First, _Second> > - : conditional<_IsSame<__remove_const_t<_First>, _Key>::value, - __extract_key_first_tag, __extract_key_fail_tag>::type {}; + : __conditional_t<_IsSame<__remove_const_t<_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag> { +}; // __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) diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h --- a/libcxx/include/__type_traits/common_type.h +++ b/libcxx/include/__type_traits/common_type.h @@ -47,10 +47,7 @@ // sub-bullet 3 - "if decay_t() : declval())> ..." template -struct __common_type2_imp<_Tp, _Up, - typename __void_t() : declval<_Up>() - )>::type> +struct __common_type2_imp<_Tp, _Up, __void_t() : declval<_Up>())> > { typedef _LIBCPP_NODEBUG typename decay() : declval<_Up>() @@ -82,8 +79,7 @@ template struct __common_type_impl< - __common_types<_Tp, _Up>, - typename __void_t::type>::type> + __common_types<_Tp, _Up>, __void_t::type> > { typedef typename common_type<_Tp, _Up>::type type; }; @@ -91,7 +87,7 @@ template struct __common_type_impl< __common_types<_Tp, _Up, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)>, - typename __void_t::type>::type> + __void_t::type> > : __common_type_impl<__common_types::type, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)> > { }; diff --git a/libcxx/include/__type_traits/is_allocator.h b/libcxx/include/__type_traits/is_allocator.h --- a/libcxx/include/__type_traits/is_allocator.h +++ b/libcxx/include/__type_traits/is_allocator.h @@ -26,8 +26,8 @@ template struct __is_allocator<_Alloc, - typename __void_t::type, - typename __void_t().allocate(size_t(0)))>::type + __void_t, + __void_t().allocate(size_t(0)))> > : true_type {}; diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h --- a/libcxx/include/__type_traits/is_swappable.h +++ b/libcxx/include/__type_traits/is_swappable.h @@ -118,13 +118,13 @@ template struct _LIBCPP_TEMPLATE_VIS is_swappable - : public conditional< + : public __conditional_t< __libcpp_is_referenceable<_Tp>::value, is_swappable_with< __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp> >, false_type - >::type + > { }; @@ -136,13 +136,13 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable - : public conditional< + : public __conditional_t< __libcpp_is_referenceable<_Tp>::value, is_nothrow_swappable_with< __add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp> >, false_type - >::type + > { }; diff --git a/libcxx/include/__type_traits/maybe_const.h b/libcxx/include/__type_traits/maybe_const.h --- a/libcxx/include/__type_traits/maybe_const.h +++ b/libcxx/include/__type_traits/maybe_const.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -using __maybe_const = typename conditional<_Const, const _Tp, _Tp>::type; +using __maybe_const = __conditional_t<_Const, const _Tp, _Tp>; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__type_traits/void_t.h b/libcxx/include/__type_traits/void_t.h --- a/libcxx/include/__type_traits/void_t.h +++ b/libcxx/include/__type_traits/void_t.h @@ -21,8 +21,8 @@ template using void_t = void; #endif -template -struct __void_t { typedef void type; }; +template +using __void_t = void; _LIBCPP_END_NAMESPACE_STD 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 @@ -28,8 +28,7 @@ template using __move_if_noexcept_result_t = - typename conditional::value && is_copy_constructible<_Tp>::value, const _Tp&, - _Tp&&>::type; + __conditional_t::value && is_copy_constructible<_Tp>::value, const _Tp&, _Tp&&>; template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 __move_if_noexcept_result_t<_Tp> diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -135,12 +135,12 @@ }; template - using _CheckTLC _LIBCPP_NODEBUG = typename conditional< + using _CheckTLC _LIBCPP_NODEBUG = __conditional_t< __tuple_like_with_size<_Tuple, 2>::value && !is_same::type, pair>::value, _CheckTupleLikeConstructor, __check_tuple_constructor_fail - >::type; + >; template::__enable_explicit_default() @@ -290,10 +290,10 @@ typename __make_tuple_indices::type()) {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - pair& operator=(typename conditional< + pair& operator=(__conditional_t< is_copy_assignable::value && is_copy_assignable::value, - pair, __nat>::type const& __p) + pair, __nat> const& __p) _NOEXCEPT_(is_nothrow_copy_assignable::value && is_nothrow_copy_assignable::value) { @@ -303,10 +303,10 @@ } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 - pair& operator=(typename conditional< + pair& operator=(__conditional_t< is_move_assignable::value && is_move_assignable::value, - pair, __nat>::type&& __p) + pair, __nat>&& __p) _NOEXCEPT_(is_nothrow_move_assignable::value && is_nothrow_move_assignable::value) { diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -266,8 +266,7 @@ typedef _VSTD::reverse_iterator reverse_iterator; typedef _VSTD::reverse_iterator const_reverse_iterator; - typedef typename conditional::value, const char, - char>::type _CharType; + typedef __conditional_t::value, const char, char> _CharType; struct _ArrayInStructT { _Tp __data_[1]; }; _ALIGNAS_TYPE(_ArrayInStructT) _CharType __elems_[sizeof(_ArrayInStructT)]; diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -2623,17 +2623,17 @@ #endif #if ATOMIC_LLONG_LOCK_FREE == 2 -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>::type __libcpp_signed_lock_free; -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>::type __libcpp_unsigned_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long> __libcpp_unsigned_lock_free; #elif ATOMIC_INT_LOCK_FREE == 2 -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int>::type __libcpp_signed_lock_free; -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>::type __libcpp_unsigned_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int> __libcpp_unsigned_lock_free; #elif ATOMIC_SHORT_LOCK_FREE == 2 -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short>::type __libcpp_signed_lock_free; -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>::type __libcpp_unsigned_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short> __libcpp_unsigned_lock_free; #elif ATOMIC_CHAR_LOCK_FREE == 2 -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char>::type __libcpp_signed_lock_free; -typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type __libcpp_unsigned_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char> __libcpp_unsigned_lock_free; #else // No signed/unsigned lock-free types #define _LIBCPP_NO_LOCK_FREE_TYPES diff --git a/libcxx/include/experimental/__memory b/libcxx/include/experimental/__memory --- a/libcxx/include/experimental/__memory +++ b/libcxx/include/experimental/__memory @@ -56,11 +56,11 @@ = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; static const bool __ic_second = - conditional< + __conditional_t< __ic_first, false_type, is_constructible<_Tp, _Args..., _Alloc> - >::type::value; + >::value; static_assert(__ic_first || __ic_second, "Request for uses allocator construction is ill-formed"); diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine --- a/libcxx/include/experimental/coroutine +++ b/libcxx/include/experimental/coroutine @@ -84,8 +84,7 @@ struct __coroutine_traits_sfinae {}; template -struct __coroutine_traits_sfinae< - _Tp, typename __void_t::type> +struct __coroutine_traits_sfinae<_Tp, __void_t > { using promise_type = typename _Tp::promise_type; }; diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -252,18 +252,12 @@ #if defined(_LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB) typedef __begin_node_pointer __iter_node_pointer; #else - typedef typename conditional< - is_pointer<__void_pointer>::value, - __begin_node_pointer, - __node_pointer - >::type __iter_node_pointer; + typedef __conditional_t::value, __begin_node_pointer, __node_pointer> + __iter_node_pointer; #endif - typedef typename conditional< - is_same<__iter_node_pointer, __node_pointer>::value, - __begin_node_pointer, - __node_pointer - >::type __non_iter_node_pointer; + typedef __conditional_t::value, __begin_node_pointer, __node_pointer> + __non_iter_node_pointer; _LIBCPP_INLINE_VISIBILITY static __iter_node_pointer __as_iter_node(__iter_node_pointer __p) { @@ -292,16 +286,11 @@ }; template -struct _LIBCPP_HIDDEN __begin_node_of -{ - typedef __forward_begin_node< - __rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > - > type; -}; +using __begin_node_of = __forward_begin_node<__rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > >; template struct _LIBCPP_STANDALONE_DEBUG __forward_list_node - : public __begin_node_of<_Tp, _VoidPtr>::type + : public __begin_node_of<_Tp, _VoidPtr> { typedef _Tp value_type; @@ -483,7 +472,7 @@ typedef typename allocator_traits::void_pointer void_pointer; typedef __forward_list_node __node; - typedef typename __begin_node_of::type __begin_node; + typedef __begin_node_of __begin_node; typedef typename __rebind_alloc_helper, __node>::type __node_allocator; typedef allocator_traits<__node_allocator> __node_traits; typedef typename __node_traits::pointer __node_pointer; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -247,18 +247,11 @@ #if defined(_LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB) typedef __base_pointer __link_pointer; #else - typedef typename conditional< - is_pointer<_VoidPtr>::value, - __base_pointer, - __node_pointer - >::type __link_pointer; + typedef __conditional_t::value, __base_pointer, __node_pointer> __link_pointer; #endif - typedef typename conditional< - is_same<__link_pointer, __node_pointer>::value, - __base_pointer, - __node_pointer - >::type __non_link_pointer; + typedef __conditional_t::value, __base_pointer, __node_pointer> + __non_link_pointer; static _LIBCPP_INLINE_VISIBILITY __link_pointer __unsafe_link_pointer_cast(__link_pointer __p) { diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1112,7 +1112,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if < - is_same&>() << declval::pointer>()))>::type>::value, + is_same&>() << declval::pointer>()))> >::value, basic_ostream<_CharT, _Traits>& >::type operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)