-
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
codecvt: no conversion for all char-like types of size 1. #2739
Conversation
template <class>
_INLINE_VAR constexpr bool test = false;
template <>
_INLINE_VAR constexpr bool test<char> = true; in two different cpp files gives Fortunately, there is no code like this in the STL. Ordinary constexpr variables or constexpr templates variables without explicit specialization work fine. |
Co-authored-by: Alex Guteniev <[email protected]>
Do we need Lines 174 to 180 in 60decd0
|
The type traits for the "primary type categories" like ( |
|
||
template <class _Elem, class _Byte> | ||
_INLINE_VAR constexpr bool _Is_codecvt_do_always_noconv_v = | ||
is_same_v<_Byte, _Elem> || (_Is_one_byte_char_like_v<_Byte> && _Is_one_byte_char_like_v<_Elem>); |
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.
It might be nice to also check for _Is_two_byte_char_like_v
, for wchar_t
/char16_t
?
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.
Yes, there is an issue for that: #605 (comment)
but I have not yet explored what needs to be done there to speed up
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for this major performance improvement! 🚀 🐇 🏎️ |
…2739) Co-authored-by: Alex Guteniev <[email protected]>
Fixes #2109
Fixes #817