-
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-3720 Restrict the valid types of arg-id for width and precision in std-format-spec #3511
Conversation
…recision in std-format-spec
'0' is type erasured as wchar_t, ( I'm not sure what we should do with |
I think we can still tell The real problem, IMO, is that it's impossible to conform to both [format.arg]/6.1 and [format.arg]/6.4 when |
Co-authored-by: A. Jiang <[email protected]>
Thank @frederick-vs-ja ! Ok, I got you, so this code is accepted with std::wstring s = std::format(L"{:*^{}}\n", 'a', L'0'); and the lwg issue has the sentence:
|
This works because we have machinery that promotes tiny types before they're seen here. The test coverage for |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for the precise PR! 🎯 🎉 😸 |
Fixes #3425