Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary typenames for all standard headers introduced in C++20 #3893

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stl/inc/compare
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ namespace _Strong_order {
} else if constexpr (_Strat == _St::_Floating) {
using _Floating_type = decay_t<_Ty1>;
using _Traits = _Floating_type_traits<_Floating_type>;
using _Uint_type = typename _Traits::_Uint_type;
using _Uint_type = _Traits::_Uint_type;
using _Sint_type = make_signed_t<_Uint_type>;

const auto _Left_uint = _Bit_cast<_Uint_type>(_Left);
Expand Down Expand Up @@ -530,7 +530,7 @@ namespace _Weak_order {
} else if constexpr (_Strat == _St::_Floating) {
using _Floating_type = decay_t<_Ty1>;
using _Traits = _Floating_type_traits<_Floating_type>;
using _Uint_type = typename _Traits::_Uint_type;
using _Uint_type = _Traits::_Uint_type;
using _Sint_type = make_signed_t<_Uint_type>;

auto _Left_uint = _Bit_cast<_Uint_type>(_Left);
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/numbers
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace numbers {
};

template <class _Ty>
using _Reject_invalid_t = typename _Reject_invalid<_Ty>::type;
using _Reject_invalid_t = _Reject_invalid<_Ty>::type;

_EXPORT_STD template <class _Ty>
inline constexpr _Ty e_v = static_cast<_Reject_invalid_t<_Ty>>(2.718281828459045);
Expand Down
18 changes: 9 additions & 9 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ namespace ranges {
using iterator_concept = random_access_iterator_tag;
using iterator_category = random_access_iterator_tag;
using value_type = _Ty;
using difference_type = typename _Repeat_view_difference_type<_Index_type>::type;
using difference_type = _Repeat_view_difference_type<_Index_type>::type;

_Iterator() = default;

Expand Down Expand Up @@ -4814,7 +4814,7 @@ namespace ranges {
template <forward_range _BaseTy>
class _Inner_iter_base<_BaseTy> {
private:
using _BaseCategory = typename iterator_traits<iterator_t<_BaseTy>>::iterator_category;
using _BaseCategory = iterator_traits<iterator_t<_BaseTy>>::iterator_category;

public:
using iterator_category =
Expand Down Expand Up @@ -4881,7 +4881,7 @@ namespace ranges {
}

public:
using iterator_concept = typename _Outer_iter<_Const>::iterator_concept;
using iterator_concept = _Outer_iter<_Const>::iterator_concept;
using value_type = range_value_t<_BaseTy>;
using difference_type = range_difference_t<_BaseTy>;

Expand Down Expand Up @@ -7729,7 +7729,7 @@ namespace ranges {
template <forward_range _BaseTy>
class _Category_base<_BaseTy> {
private:
using _BaseCategory = typename iterator_traits<iterator_t<_BaseTy>>::iterator_category;
using _BaseCategory = iterator_traits<iterator_t<_BaseTy>>::iterator_category;

public:
using iterator_category = conditional_t<derived_from<_BaseCategory, random_access_iterator_tag>,
Expand Down Expand Up @@ -8684,7 +8684,7 @@ namespace ranges {
: _Parent(_STD addressof(_Parent_)), _Inner(_STD move(_Inner_)) {}

public:
using iterator_concept = typename _Ziperator<_IsConst>::iterator_concept;
using iterator_concept = _Ziperator<_IsConst>::iterator_concept;
using value_type = remove_cvref_t<invoke_result_t<_Maybe_const<_IsConst, _Func>&,
range_reference_t<_Maybe_const<_IsConst, _ViewTypes>>...>>;
using difference_type = range_difference_t<_Base_t>;
Expand Down Expand Up @@ -9006,7 +9006,7 @@ namespace ranges {
};

template <class _Ty, size_t _Nx>
using _Repeated_tuple = typename _Repeated_tuple_impl<_Ty, make_index_sequence<_Nx>>::type;
using _Repeated_tuple = _Repeated_tuple_impl<_Ty, make_index_sequence<_Nx>>::type;

template <class _Fn, class _Ty, class _Indices>
inline constexpr bool _Regular_invocable_with_repeated_type_impl = false;
Expand All @@ -9033,7 +9033,7 @@ namespace ranges {

template <class _Fn, class _Ty, size_t _Nx>
using _Invoke_result_with_repeated_type =
typename _Invoke_result_with_repeated_type_impl<_Fn, _Ty, make_index_sequence<_Nx>>::type;
_Invoke_result_with_repeated_type_impl<_Fn, _Ty, make_index_sequence<_Nx>>::type;

template <class _Vw, class _Fn, size_t _Nx>
concept _Adjacent_transform_constraints =
Expand Down Expand Up @@ -9478,7 +9478,7 @@ namespace ranges {
range_reference_t<_Base>, _Nx>>) {
return input_iterator_tag{};
} else {
using _Cat = typename iterator_traits<iterator_t<_Base>>::iterator_category;
using _Cat = iterator_traits<iterator_t<_Base>>::iterator_category;

if constexpr (derived_from<_Cat, random_access_iterator_tag>) {
return random_access_iterator_tag{};
Expand All @@ -9500,7 +9500,7 @@ namespace ranges {

public:
using iterator_category = decltype(_Get_iterator_category());
using iterator_concept = typename _Inner_iterator<_Const>::iterator_concept;
using iterator_concept = _Inner_iterator<_Const>::iterator_concept;
using value_type = remove_cvref_t<
_Invoke_result_with_repeated_type<_Maybe_const<_Const, _Fn>&, range_reference_t<_Base>, _Nx>>;
using difference_type = range_difference_t<_Base>;
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/stacktrace
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ public:
using value_type = stacktrace_entry;
using const_reference = const value_type&;
using reference = value_type&;
using const_iterator = typename _Frames_t::const_iterator;
using const_iterator = _Frames_t::const_iterator;
using iterator = const_iterator;
using reverse_iterator = _STD reverse_iterator<iterator>;
using const_reverse_iterator = _STD reverse_iterator<const_iterator>;
using difference_type = typename _Frames_t::difference_type;
using size_type = typename _Frames_t::size_type;
using difference_type = _Frames_t::difference_type;
using size_type = _Frames_t::size_type;
using allocator_type = _Alloc;

// __declspec(noinline) to make the same behavior for debug and release.
Expand Down
16 changes: 8 additions & 8 deletions stl/inc/syncstream
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ protected:
_EXPORT_STD template <class _Elem, class _Traits, class _Alloc>
class basic_syncbuf : public _Basic_syncbuf_impl<_Elem, _Traits> {
public:
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using allocator_type = _Alloc;
using streambuf_type = basic_streambuf<_Elem, _Traits>;

using _Mybase = _Basic_syncbuf_impl<_Elem, _Traits>;
using _Pointer = typename allocator_traits<_Alloc>::pointer;
using _Size_type = typename allocator_traits<_Alloc>::size_type;
using _Pointer = allocator_traits<_Alloc>::pointer;
using _Size_type = allocator_traits<_Alloc>::size_type;

using _Mybase::set_emit_on_sync;

Expand Down Expand Up @@ -319,9 +319,9 @@ _EXPORT_STD template <class _Elem, class _Traits, class _Alloc>
class basic_osyncstream : public basic_ostream<_Elem, _Traits> {
public:
using char_type = _Elem;
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using traits_type = _Traits;
using allocator_type = _Alloc;
using streambuf_type = basic_streambuf<_Elem, _Traits>;
Expand Down