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

Change typedef to using #3018

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

StephanTLavavej
Copy link
Member

Mechanically replaced (\w+) typedef (.+) (\w+); with using $3 $1 = $2;.

Long long ago, we replaced every occurrence of typedef in product code with using, as it's more readable and consistent (alias templates must be using). However, there were compiler bugs with using and attributes, so we didn't replace deprecated typedefs. Those compiler bugs were fixed long ago, and we've already accumulated a few occurrences of deprecated using, e.g.:

STL/stl/inc/type_traits

Lines 1097 to 1098 in 5aae678

template <size_t _Len, size_t _Align = alignof(max_align_t)>
using aligned_storage_t _CXX23_DEPRECATE_ALIGNED_STORAGE = _Aligned_storage_t<_Len, _Align>;

This finishes the overhaul for product code.

Mechanically replaced `(\w+) typedef (.+) (\w+);` with `using $3 $1 = $2;`.

Long ago, there were compiler bugs with `using` and attributes. Those have been fixed, and we've already accumulated a few occurrences. This finishes the overhaul.
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Aug 10, 2022
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner August 10, 2022 05:10
@StephanTLavavej StephanTLavavej self-assigned this Aug 11, 2022
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7558a2a into microsoft:main Aug 12, 2022
@StephanTLavavej StephanTLavavej deleted the typedef-using branch August 12, 2022 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
  翻译: