Skip to content

Implement P2655R3 common_reference_t Of reference_wrapper Should Be A Reference Type - #3513

Merged
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
frederick-vs-ja:p2655r3
Mar 3, 2023
Merged

Implement P2655R3 common_reference_t Of reference_wrapper Should Be A Reference Type#3513
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
frederick-vs-ja:p2655r3

Conversation

@frederick-vs-ja

Copy link
Copy Markdown
Contributor

Fixes #3444.

I think the changes should be applied to C++20 mode as this documentation said P2655 is possibly a DR.

Also

@frederick-vs-ja
A. Jiang (frederick-vs-ja) requested a review from a team as a code owner February 28, 2023 17:47

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor questions, otherwise looks good!

Comment thread tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp Outdated
Comment thread stl/inc/type_traits Outdated
Comment thread tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp Outdated
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/type_traits Outdated
Comment thread stl/inc/type_traits Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks, this looks solid, and I agree that implementing it in C++20 mode is reasonable! 😻 (This aligns with our usual rationale - if a paper deeply modifies an existing feature in a way that doesn't introduce new names, isn't likely to be source-breaking, is generally experienced as a strict improvement, and would be obnoxious to conditionally maintain, then implementing it retroactively is desirable. This is very much like the enable_shared_from_this overhaul.)

I've pushed some nitpicky cosmetic changes, nothing functional. FYI nicole mazzuca (@strega-nil-ms) as you already approved.

@StephanTLavavej

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit ec7cc0f into microsoft:main Mar 3, 2023
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for enhancing some of the STL's most intricate template machinery! ⚙️ ✨ 🚀

@frederick-vs-ja
A. Jiang (frederick-vs-ja) deleted the p2655r3 branch March 3, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx23 C++23 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2655R3 common_reference_t Of reference_wrapper Should Be A Reference Type

3 participants