Standard Library Modules: Fix time_put<wchar_t> linker errors#3232
Standard Library Modules: Fix time_put<wchar_t> linker errors#3232StephanTLavavej merged 4 commits intomicrosoft:mainfrom
time_put<wchar_t> linker errors#3232Conversation
The primary template isn't marked. See VSO-1674115 "__declspec(dllimport) on partial specialization has no semantic meaning". Verified that release and debug exports are unchanged.
…ary template. See VSO-1593165 "Standard Library Modules: time_put<wchar_t> emits bogus error LNK2019: unresolved external symbol".
…r primary templates. This doesn't appear to affect correctness, but it's what I originally intended.
|
I can't wrap my brain around why we need (To be clear: this isn't a concern with the content of the PR - I'm happy to apply this on the basis that it "works" - so much as trying to get my head straight so I can spot similar problems in the future.) |
|
I suspect that |
|
Aha, I think I have a better guess! Again, not totally sure what's really happening here, but this does seem like the relevant difference that would explain why |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for taking the time to put this right! |
time_putpartial specializations as_CRTIMP2_PURE_IMPORT.STL/stl/inc/xloctime
Lines 651 to 652 in 0098818
__declspec(dllimport)on partial specialization has no semantic meaning". It's deeply confusing to retain something that has no effect, so I'm removing it.time_putpartial specializations asextern "C++"like their primary template.time_put<wchar_t>emits bogus error LNK2019: unresolved external symbol", which I originally thought was a compiler bug. Thanks again @cdacamar for analyzing this.time_put<wchar_t>scenario.codecvt/ctypeexplicit specializations asextern "C++"like their primary templates:STL/stl/inc/xlocale
Lines 668 to 669 in 0098818
STL/stl/inc/xlocale
Lines 2385 to 2386 in 0098818
extern "C++"on a primary template would affect all explicit/partial specializations, which is actually howexportworks.)