-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
Perhaps I was confused by the "explicit" in "explicit object parameter".
Note that |
There was a problem hiding this 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!
Co-authored-by: nicole mazzuca <[email protected]>
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). |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for updating the library to keep up with the compiler's Future Technology! 🤖 🚀 😸 |
…educing `this` (microsoft#2966) Co-authored-by: nicole mazzuca <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
…educing `this` (microsoft#2966) Co-authored-by: nicole mazzuca <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
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.