diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table index 20223014432fdd..036b0dcadc714f 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -178,16 +178,14 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > { template _LIBCPP_INLINE_VISIBILITY - static typename enable_if<__is_same_uncvref<_Up, __node_value_type>::value, - __container_value_type const&>::type + static __enable_if_t<__is_same_uncvref<_Up, __node_value_type>::value, __container_value_type const&> __get_value(_Up& __t) { return __t.__get_value(); } template _LIBCPP_INLINE_VISIBILITY - static typename enable_if<__is_same_uncvref<_Up, __container_value_type>::value, - __container_value_type const&>::type + static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, __container_value_type const&> __get_value(_Up& __t) { return __t; } @@ -1049,10 +1047,8 @@ public: template _LIBCPP_INLINE_VISIBILITY - typename enable_if< - __can_extract_map_key<_First, key_type, __container_value_type>::value, - pair - >::type __emplace_unique(_First&& __f, _Second&& __s) { + __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, pair > + __emplace_unique(_First&& __f, _Second&& __s) { return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f), _VSTD::forward<_Second>(__s)); } @@ -1096,9 +1092,7 @@ public: return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _VSTD::move(__x)); } - template ::value - >::type> + template ::value> > _LIBCPP_INLINE_VISIBILITY pair __insert_unique(_Pp&& __x) { return __emplace_unique(_VSTD::forward<_Pp>(__x)); diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base index da056b6d14237a..ac0d090b7d1944 100644 --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -338,11 +338,7 @@ private: template inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - is_floating_point<_Rep>::value, - chrono::nanoseconds ->::type +__enable_if_t::value, chrono::nanoseconds> __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) { using namespace chrono; @@ -365,11 +361,7 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) template inline _LIBCPP_INLINE_VISIBILITY -typename enable_if -< - !is_floating_point<_Rep>::value, - chrono::nanoseconds ->::type +__enable_if_t::value, chrono::nanoseconds> __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) { using namespace chrono; diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer index e484e70440c9a1..c1c03dd741b0f8 100644 --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -118,19 +118,10 @@ public: void __construct_at_end(size_type __n); void __construct_at_end(size_type __n, const_reference __x); template - typename enable_if - < - __is_cpp17_input_iterator<_InputIter>::value && - !__is_cpp17_forward_iterator<_InputIter>::value, - void - >::type + __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value && !__is_cpp17_forward_iterator<_InputIter>::value> __construct_at_end(_InputIter __first, _InputIter __last); template - typename enable_if - < - __is_cpp17_forward_iterator<_ForwardIterator>::value, - void - >::type + __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value> __construct_at_end(_ForwardIterator __first, _ForwardIterator __last); _LIBCPP_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin) @@ -239,12 +230,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_referen template template -typename enable_if -< - __is_cpp17_input_iterator<_InputIter>::value && - !__is_cpp17_forward_iterator<_InputIter>::value, - void ->::type +__enable_if_t<__is_cpp17_input_iterator<_InputIter>::value && !__is_cpp17_forward_iterator<_InputIter>::value> __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last) { __alloc_rr& __a = this->__alloc(); @@ -267,11 +253,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIt template template -typename enable_if -< - __is_cpp17_forward_iterator<_ForwardIterator>::value, - void ->::type +__enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value> __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) { _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last)); diff --git a/libcxx/include/__tree b/libcxx/include/__tree index e5dd1f4d45ea95..8d8449706871f6 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -597,8 +597,7 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > { template _LIBCPP_INLINE_VISIBILITY - static typename enable_if<__is_same_uncvref<_Up, __container_value_type>::value, - key_type const&>::type + static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, key_type const&> __get_key(_Up& __t) { return __t.first; } @@ -611,8 +610,7 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > { template _LIBCPP_INLINE_VISIBILITY - static typename enable_if<__is_same_uncvref<_Up, __container_value_type>::value, - __container_value_type const&>::type + static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, __container_value_type const&> __get_value(_Up& __t) { return __t; } @@ -1175,10 +1173,8 @@ public: template _LIBCPP_INLINE_VISIBILITY - typename enable_if< - __can_extract_map_key<_First, key_type, __container_value_type>::value, - pair - >::type __emplace_unique(_First&& __f, _Second&& __s) { + __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, pair > + __emplace_unique(_First&& __f, _Second&& __s) { return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f), _VSTD::forward<_Second>(__s)); } @@ -1219,10 +1215,8 @@ public: template _LIBCPP_INLINE_VISIBILITY - typename enable_if< - __can_extract_map_key<_First, key_type, __container_value_type>::value, - iterator - >::type __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) { + __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, iterator> + __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) { return __emplace_hint_unique_key_args(__p, __f, _VSTD::forward<_First>(__f), _VSTD::forward<_Second>(__s)).first; @@ -1275,21 +1269,15 @@ public: return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)).first; } - template ::type, - __container_value_type - >::value - >::type> + template ::type, __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 - >::type> + template ::type, __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 index 6d13bb24c57950..f85036e7af1db9 100644 --- a/libcxx/include/__tuple +++ b/libcxx/include/__tuple @@ -30,14 +30,14 @@ using __enable_if_tuple_size_imp = _Tp; template struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< const _Tp, - typename enable_if::value>::type, + __enable_if_t::value>, integral_constant)>>> : public integral_constant::value> {}; template struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< volatile _Tp, - typename enable_if::value>::type, + __enable_if_t::value>, integral_constant)>>> : public integral_constant::value> {}; @@ -393,7 +393,7 @@ struct __tuple_sfinae_base { template