This is an archive of the discontinued LLVM Phabricator instance.

[libc++][format] Addresses LWG3810.
ClosedPublic

Authored by Mordante on Feb 17 2023, 9:11 AM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Commits
rG8caa8d95afe4: [libc++][format] Addresses LWG3810.
Summary
LWG3810 CTAD for std::basic_format_args

Diff Detail

Event Timeline

Mordante created this revision.Feb 17 2023, 9:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 9:11 AM
Mordante requested review of this revision.Feb 17 2023, 9:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 9:11 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Feb 17 2023, 9:14 AM
philnik added a subscriber: philnik.

LGTM.

libcxx/include/__format/format_args.h
76

Was there no test for the CTAD support before?

This revision is now accepted and ready to land.Feb 17 2023, 9:14 AM
Mordante marked an inline comment as done.Feb 17 2023, 9:35 AM

Thanks for the review!

libcxx/include/__format/format_args.h
76

No that is the "silence the compiler when we want implicit CTAD" version. We don't have tests for these.

philnik added inline comments.Feb 17 2023, 9:38 AM
libcxx/include/__format/format_args.h
76

I was asked by Louis to add one for the one I added for move_iterator(?). Weird that we don't have tests for all of them.

Mordante marked an inline comment as done.Feb 17 2023, 9:52 AM
Mordante added a subscriber: ldionne.
Mordante added inline comments.
libcxx/include/__format/format_args.h
76

The original CTAD was added in D133535, but no test. I see some implicit CTAD tests added in that revision.
@ldionne should these test have been added for all types with the CTAD macro?

This revision was automatically updated to reflect the committed changes.
ldionne added inline comments.Feb 27 2023, 9:39 AM
libcxx/include/__format/format_args.h
76

Yes, tests should have been added in D133535 for all public types where I added the _LIBCPP_CTAD_SUPPORTED_FOR_TYPE macro. I just checked and it seems like I only missed this one, all the other ones seem to have tests.

Mordante added inline comments.Feb 27 2023, 10:20 AM
libcxx/include/__format/format_args.h
76

Thanks, it seems the LWG issue was very useful ;-)