-
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
When wchar_t is a real type, users shouldn't see unsigned short machinery #2164
Conversation
I'm not quite sure if I need to do something with codecvt <unsigned short, char, mbstate_t>, need I? Lines 254 to 258 in 78ff461
? |
I suspect (70% sure) that it should be guarded by Lines 2106 to 2108 in 3136525
Line 2306 in 3136525
Only the 5 following source files mention Lines 10 to 12 in 3136525
Lines 10 to 12 in 3136525
Lines 10 to 12 in 3136525
Lines 10 to 12 in 3136525
Lines 9 to 11 in 3136525
|
Summarizing here a discussion I had with myself in Discord: explicit template specializations should be visible whenever it's possible to instantiate them implicitly from a primary template or partial specialization. Hiding explicit specializations is simply asking for ODR violation nightmares. Consequently, I think |
…hen `_ENFORCE_FACET_SPECIALIZATIONS` is 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for helping to partially excise this historical abomination.
@@ -63,9 +63,9 @@ _INLINE_VAR constexpr bool _Is_any_path = _Is_any_of_v<_Ty | |||
_CRTIMP2_PURE FILE* __CLRCALL_PURE_OR_CDECL _Fiopen(const char*, ios_base::openmode, int); | |||
_CRTIMP2_PURE FILE* __CLRCALL_PURE_OR_CDECL _Fiopen(const wchar_t*, ios_base::openmode, int); | |||
|
|||
#ifdef _NATIVE_WCHAR_T_DEFINED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never given it any thought before, but seriously who put defined
in the name of a macro so we have to query if MEOW_DEFINED
is defined??!? This is even worse that putting not
in the name of a boolean condition. (No change requested.)
using ushfilebuf = basic_filebuf<unsigned short, char_traits<unsigned short>>; | ||
|
||
_STD_END | ||
|
||
#ifndef wistream | ||
#define wistream ushistream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤮🤮🤮 (No change requested; looking in these old sources can be painful.)
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks again for eliminating these bizarre specializations as much as possible! 👻 🎉 😸 |
Fixes #216