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

GB229 20.20.03 Allow std::format to throw for argument / format string mismatch LWG 3340 #226

Closed
wg21bot opened this issue Oct 24, 2019 · 4 comments · Fixed by cplusplus/draft#3749
Labels
Projects
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 24, 2019

Formatting functions don't allow throwing on incorrect arguments
std::format is only allowed to throw if fmt is not a format string, but the intention is it also throws for errors during formatting, e.g. there are fewer arguments than required by the format string.

Proposed change:
Allow exceptions even when the format string is valid. Possibly state the Effects: more precisely.

@wg21bot wg21bot added the LEWG Library Evolution label Oct 24, 2019
@tituswinters
Copy link

LEWG in Belfast: Victor Z to file an LWG issue, suggesting that LEWG approves of the ability for std::format (et al) to throw when given format strings that are invalid for that invocation (rather than only throwing on inputs that are invalid format strings).

@vitaut
Copy link

vitaut commented Nov 23, 2019

@jensmaurer jensmaurer added the rejected No consensus for a change. label Feb 2, 2020
@JeffGarland
Copy link
Member

LWG has not prioritized 3340 -- will consider in Prague

@jensmaurer jensmaurer removed the rejected No consensus for a change. label Feb 13, 2020
@jensmaurer jensmaurer reopened this Feb 13, 2020
@jensmaurer jensmaurer added LWG Library and removed LEWG Library Evolution labels Feb 13, 2020
@jensmaurer jensmaurer added this to Inbox in LWG Feb 13, 2020
@mclow mclow moved this from Inbox to Accepted in LWG Feb 13, 2020
@mclow
Copy link

mclow commented Feb 13, 2020

LWG3340 accepted on Thursday AM in Prague and LWG3336 will be marked as "Resolved by 3340"

@jensmaurer jensmaurer changed the title GB229 20.20.03 Allow std::format to throw for argument / format string mismatch GB229 20.20.03 Allow std::format to throw for argument / format string mismatch LWG 3340 Feb 16, 2020
@jensmaurer jensmaurer added this to the CD C++20 milestone Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
LWG
Accepted
Development

Successfully merging a pull request may close this issue.

6 participants