Page MenuHomePhabricator

[libc++][format] Addresses LWG3720.
Needs ReviewPublic

Authored by Mordante on Feb 18 2023, 3:48 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary
LWG3720 Restrict the valid types of arg-id for width and precision in
std-format-spec

Depends on D144325

Diff Detail

Event Timeline

Mordante created this revision.Feb 18 2023, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2023, 3:48 AM
Mordante requested review of this revision.Feb 18 2023, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2023, 3:48 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante updated this revision to Diff 498576.Feb 18 2023, 4:32 AM

CI fixes.

Mordante updated this revision to Diff 498587.Feb 18 2023, 6:28 AM

CI fixes.

ldionne added inline comments.
libcxx/test/std/utilities/format/format.string/format.string.std/lwg3720_arg_id_width_precision_allowed_types.verify.cpp
31

Do we get some sort of note that explains the reason for the format failing to parse?

Mordante marked an inline comment as done.Tue, Mar 14, 10:27 AM
Mordante added inline comments.
libcxx/test/std/utilities/format/format.string/format.string.std/lwg3720_arg_id_width_precision_allowed_types.verify.cpp
31

Unfortunately no. I know it can be done with template magic, but that seems non-trivial to do. I have considered adding a way to get better compile time errors in Clang. There is a recent paper by Barry (P2758) which proposes something like that, but even more powerful than I originally considered.