-
Notifications
You must be signed in to change notification settings - Fork 1.6k
<format>: Make instantiation used by vformat_to lazier
#3403
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
<format>: Make instantiation used by vformat_to lazier
#3403
Conversation
|
The |
Is this even legal?🤐 What a brilliant design. |
Casey: try to avoid messing with the interface of `vformat_to`
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for helping the STL be a lazy kitty that flops on the floor and basks in sunbeams all day! 🐈 🌞 😻 |
Fixes #1926.
The (current) cause of the issue is that currently
_Parse_format_string<char, _Format_handler<char>>and itswchar_tvariant are instantiated invformat_tooverloads (I'm not sure whether it's a bug of MSVC), and thus corresponding specializations ofvisit_format_argare instantiated, so are_Fmt_writeand eventuallyuse_facetwhich toucheslocale::id.I don't know how to write the test case for this...
It seems the MSVC STL implementation (or current standard specification?) is so type-erasing that we must pay the overhead for
locale::ideven when usinglocale-freeformatoverloads.