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

Implement LWG-3617: function/packaged_task deduction guides and deducing this #2966

Merged
merged 12 commits into from
Aug 5, 2022

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #2952.

I think we should detect the predefined core language feature-test macro __cpp_explicit_this_parameter, but MSVC didn't define it in VS2022 17.2 and 17.3, so I filed DevCom-10107077.

I can imagine the future where there will be "C++17/20 with explicit object parameters" dialects, so I guess we should not restrict these library changes to C++23, and just use _HAS_CXX17 && defined(__cpp_explicit_this_parameter) to enable these changes.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner July 29, 2022 08:17
@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Jul 29, 2022
@StephanTLavavej
Copy link
Member

Note that __cpp_explicit_this_parameter wasn't defined because the feature doesn't work with modules yet.

@strega-nil-ms strega-nil-ms self-assigned this Jul 29, 2022
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

typo in tests, but otherwise LGTM!

@strega-nil-ms strega-nil-ms removed their assignment Jul 29, 2022
@StephanTLavavej
Copy link
Member

Thanks, this looks great! I never imagined that the deduction guide machinery would be extended in this way, but it works quite elegantly 😻

I've pushed a couple of small extensions to the tests (FYI @strega-nil-ms after you approved).

@StephanTLavavej StephanTLavavej self-assigned this Aug 5, 2022
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 4677bae into microsoft:main Aug 5, 2022
@StephanTLavavej
Copy link
Member

Thanks for updating the library to keep up with the compiler's Future Technology! 🤖 🚀 😸

@frederick-vs-ja frederick-vs-ja deleted the lwg-3617 branch August 5, 2022 23:58
strega-nil pushed a commit to strega-nil/stl that referenced this pull request Aug 6, 2022
…educing `this` (microsoft#2966)

Co-authored-by: nicole mazzuca <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
fsb4000 pushed a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
…educing `this` (microsoft#2966)

Co-authored-by: nicole mazzuca <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3617 function/packaged_task deduction guides and deducing this
3 participants