Skip to content

Change typedef to using - #3018

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:typedef-using
Aug 12, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:typedef-using

Conversation

@StephanTLavavej

Copy link
Copy Markdown
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
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

Copy link
Copy Markdown
Member Author

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

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