-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix missing std::char_traits<uint8_t> (if it is in fact missing). #1812 #1829
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
Open
leakingmemory
wants to merge
4
commits into
microsoft:master
from
leakingmemory:bug/char-traits-uint8-issue-1812
Open
Fix missing std::char_traits<uint8_t> (if it is in fact missing). #1812 #1829
leakingmemory
wants to merge
4
commits into
microsoft:master
from
leakingmemory:bug/char-traits-uint8-issue-1812
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
leakingmemory
commented
Jun 21, 2025
@microsoft-github-policy-service agree
...tion function of print/format through the specializations leading to infinite recursion. Fixes streams_test broken by the char_traits fixes. Unfortunately reuires some extra string copying because the std streams library really really doesn't work well on anything but char (signed) types on gcc and llvm, so general advice seems to be to convert to char on the way in and back to unsigned on the way out if one really need the std streams library to work on unsigned types. microsoft#1812
Author
leakingmemory
commented
Oct 23, 2025
Just to clarify on this. My personal opinion is that it is better to break compatibility and fix this by not using unsigned char types with C++ streams. It has worked fine on some compilers and standard libraries, but to my knowledge only char types are supported by the C++ standard. This pull request was made with the intention to not break compatibility with existing code.
yuxiang-wen
commented
Oct 23, 2025
via email
收到,谢谢
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.