-
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
Standard Library Modules: Fix time_put<wchar_t>
linker errors
#3232
Conversation
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_put
partial 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_put
partial 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
/ctype
explicit 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 howexport
works.)