<format>: Make instantiation used by vformat_to lazier#3403
<format>: Make instantiation used by vformat_to lazier#3403StephanTLavavej merged 4 commits intomicrosoft:mainfrom
<format>: Make instantiation used by vformat_to lazier#3403Conversation
|
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.