Skip to content

Build error on OSX with Xcode 16.3 #1825

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

Closed
pcaspers opened this issue May 9, 2025 · 1 comment
Closed

Build error on OSX with Xcode 16.3 #1825

pcaspers opened this issue May 9, 2025 · 1 comment

Comments

@pcaspers
Copy link

pcaspers commented May 9, 2025

I am getting a compile error on OSX with Xcode 16.3.

[build] /Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/string:821:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
[build]   821 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
[build]       |                                          ^
[build] /Users/a/repositories/homebrew/include/cpprest/streams.h:79:39: note: in instantiation of template class 'std::basic_string<unsigned char>' requested here
[build]    79 |     static std::basic_string<uint8_t> format(const T& val)
[build]       |                                       ^
[build] /Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
[build]    23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
[build]       |                             ^

See here

https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes

In particular:

The base template for std::char_traits has been removed. If you are using std::char_traits with types other than char, wchar_t, char8_t, char16_t, char32_t or a custom character type for which you specialized std::char_traits, your code will stop working. The Standard does not mandate that a base template is provided, and such a base template is bound to be incorrect for some types, which could previously cause unexpected behavior while going undetected.

@pcaspers
Copy link
Author

pcaspers commented May 9, 2025

duplicates #1812

@pcaspers pcaspers closed this as completed May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant