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 <de34@live.cn>
|
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