Skip to content
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

Xcode 16.3 Build Error • Implicit instantiation of undefined template 'std::char_traits<unsigned char>' #4364

Closed
Brett-Best opened this issue Feb 25, 2025 · 2 comments
Labels

Comments

@Brett-Best
Copy link

Brett-Best commented Feb 25, 2025

The below issue is caused because of https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes#Deprecations:

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.

/Users/brettbest/Developer/react-native/ios/Pods/fmt/include/fmt/core.h
/Users/brettbest/Developer/react-native/ios/Pods/fmt/include/fmt/core.h:378:30 Implicit instantiation of undefined template 'std::char_traits<fmt::internal::char8_type>'

in file included from /Users/brettbest/Developer/react-native/ios/Pods/fmt/src/format.cc:8:
in file included from /Users/brettbest/Developer/react-native/ios/Pods/fmt/include/fmt/format-inl.h:19:
in file included from /Users/brettbest/Developer/react-native/ios/Pods/fmt/include/fmt/format.h:44:
In instantiation of member function 'fmt::basic_string_view<fmt::internal::char8_type>::basic_string_view' requested here
Template is declared here
@vitaut
Copy link
Contributor

vitaut commented Feb 25, 2025

This looks unrelated to {fmt}, please open an issue in folly.

@vitaut vitaut closed this as completed Feb 25, 2025
@vitaut vitaut added the invalid label Feb 25, 2025
@Brett-Best
Copy link
Author

Brett-Best commented Feb 25, 2025

@vitaut my apologies I copied across the wrong error trace, would you be able to take another look please?

EDIT: I've noticed that our FMT is horribly out of date...
I will come back to this after upgrading to the latest which on CocoaPods seems fairly old.

EDIT 2: in current master:

return {s, N - (std::char_traits<Char>::to_int_type(s[N - 1]) == 0 ? 1 : 0)};

I think this will be problematic but it might be surrounded my some if defs etc that mean it won't compile for newer versions of tooling 🙏🏻 that I'm not seeing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants