- Notifications
You must be signed in to change notification settings - Fork1.7k
Add char_traits<uint8_t>#1820
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Add char_traits<uint8_t>#1820
Conversation
placintaalexandru commentedApr 10, 2025
@microsoft-github-policy-service agree |
0bcfaff to396259aCompareCpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
BillyONeal commentedMay 5, 2025
This PR introduces undefined behavior:https://eel.is/c++draft/requirements#namespace.std-2 There is no program-defined type here. This also fails if 2 libraries try to do this. |
aminya left a comment
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.
The definition needs to be guarded
| @@ -0,0 +1,74 @@ | |||
| #include <cstdint> | |||
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.
| #include<cstdint> | |
| #pragma once | |
| #include<cstddef> | |
| #if (_LIBCPP_VERSION >=190000) | |
| #include<cstdint> |
| static int_type eof() noexcept { return static_cast<int_type>(-1); } | ||
| }; | ||
| } // namespace std |
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.
| }// namespace std | |
| }// namespace std | |
| #endif// (_LIBCPP_VERSION >= 190000) |
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
Cpprestsdk fails to compile on newer MacOS due to missing char_traits.This provides the fix frommicrosoft/cpprestsdk#1820Related tomicrosoft/cpprestsdk#1812
frederick-vs-ja commentedNov 4, 2025
I guess a proper fix would be
|
leakingmemory commentedNov 4, 2025
Using unsigned types with any of the string and stream templates is a can of worms. As far as I know the C++ standard does not mandate the standard library to support unsigned char types in those. I think ideally only the standard char types should be used, and applications using stream apis should convert from and to unsigned types if they need to in application code. But it would unfortunately be a breaking change. |
frederick-vs-ja commentedNov 5, 2025
|
Uh oh!
There was an error while loading.Please reload this page.
Fixes1812
char_traits<uint8_t>type was not supplied