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

LWG-3810: CTAD for basic_format_args #3421

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

JMazurkiewicz
Copy link
Contributor

Closes #3414.

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner February 12, 2023 00:43
@StephanTLavavej StephanTLavavej added LWG Library Working Group issue format C++20/23 format labels Feb 12, 2023
Comment on lines +1994 to +1995
template <class _Context, class... _Args>
basic_format_args(_Format_arg_store<_Context, _Args...>) -> basic_format_args<_Context>;
Copy link
Member

Choose a reason for hiding this comment

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

No change requested, note to other reviewers: Deduction guides can't be exported for modules, they're just automatically available if the class is exported (which is the case here), so the lack of any _EXPORT_STD is normal.

Co-authored-by: Casey Carter <Casey@Carter.net>
@StephanTLavavej
Copy link
Member

I've pushed a commit to address @CaseyCarter's suggestion (using braces for the temporary, and applying [[maybe_unused]] to args_store even though compilers don't warn yet that it's unused at runtime). What persuaded me is that now we don't have to reason about the behavior of a test-only variable template. (Fewer lines is nicer but not decisive.)

@StephanTLavavej StephanTLavavej self-assigned this Feb 13, 2023
@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 bf64ffc into microsoft:main Feb 14, 2023
@StephanTLavavej
Copy link
Member

Thanks for implementing more Cat Template Argument Destruction, where cats bat fragile template arguments off the table to smash on the floor! 🐈 🐾 😼

@JMazurkiewicz JMazurkiewicz deleted the lwg3810 branch February 14, 2023 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format C++20/23 format LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3810 CTAD for std::basic_format_args
3 participants