You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build fails with libc++ 19 and later: std::basic_string<uint8_t> in streams.h #11
Release/include/cpprest/streams.h uses std::basic_string<uint8_t> in Value2StringFormatter<uint8_t>. The standard only defines std::char_traits for the character types, and libc++ 19 removed the generic std::char_traits template that made other types work. So the header no longer compiles with libc++ 19 or later. Current libstdc++ still accepts it.
The use is in a public header, so it breaks every consumer that includes cpprest/streams.h with libc++. That includes the default toolchain on macOS (Apple Clang), and Clang with -stdlib=libc++ elsewhere.
Proposed Fix
Base the fix on microsoft/cpprestsdk#1829, which defines cpprestsdk's own character traits for uint8_t and adjusts the tests. Do not use #1820, which specializes std::char_traits<uint8_t> in namespace std. The standard does not allow that for a type that the program does not define.
Add a CI job that builds with Clang and libc++ (or on macOS), so that this stays fixed.
Activity
Build streams.h without std::char_traits<uint8_t>