diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 12a89ab229f..049cb02a4c4 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -2536,19 +2536,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // of associative containers. template using __iter_key_t = remove_const_t< - typename iterator_traits<_InputIterator>::value_type::first_type>; + typename iterator_traits<_InputIterator>::value_type::first_type>; template - using __iter_val_t = - typename iterator_traits<_InputIterator>::value_type::second_type; + using __iter_val_t + = typename iterator_traits<_InputIterator>::value_type::second_type; template struct pair; template - using __iter_to_alloc_t = - pair>, - __iter_val_t<_InputIterator>>; + using __iter_to_alloc_t + = pair, __iter_val_t<_InputIterator>>; #endif // __cpp_deduction_guides _GLIBCXX_END_NAMESPACE_VERSION diff --git a/libstdc++-v3/include/bits/utility.h b/libstdc++-v3/include/bits/utility.h index e0e40309a6d..6a192e27836 100644 --- a/libstdc++-v3/include/bits/utility.h +++ b/libstdc++-v3/include/bits/utility.h @@ -86,19 +86,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct tuple_element<__i, const _Tp> { - typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; + using type = const __tuple_element_t<__i, _Tp>; }; template struct tuple_element<__i, volatile _Tp> { - typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; + using type = volatile __tuple_element_t<__i, _Tp>; }; template struct tuple_element<__i, const volatile _Tp> { - typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; + using type = const volatile __tuple_element_t<__i, _Tp>; }; #if __cplusplus >= 201402L diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2572d8edd69..e5f58bc2e3f 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -1577,20 +1577,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// add_const template struct add_const - { typedef _Tp const type; }; + { using type = _Tp const; }; /// add_volatile template struct add_volatile - { typedef _Tp volatile type; }; + { using type = _Tp volatile; }; /// add_cv template struct add_cv - { - typedef typename - add_const::type>::type type; - }; + { using type = _Tp const volatile; }; #if __cplusplus > 201103L diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index 5ff1e3edcdf..f8f15665433 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -107,15 +107,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct variant_alternative<_Np, const _Variant> - { using type = add_const_t>; }; + { using type = const variant_alternative_t<_Np, _Variant>; }; template struct variant_alternative<_Np, volatile _Variant> - { using type = add_volatile_t>; }; + { using type = volatile variant_alternative_t<_Np, _Variant>; }; template struct variant_alternative<_Np, const volatile _Variant> - { using type = add_cv_t>; }; + { using type = const volatile variant_alternative_t<_Np, _Variant>; }; inline constexpr size_t variant_npos = -1;