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.
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.
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