-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
libcxx: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>' #4722
Comments
Ah, this is a new change in libcxx 19: https://bugs.gentoo.org/939897#c0 |
Poco requires standard C++-17. IMO the compiler and libcxx that are used to show the reported problem do not handle C++-17 properly. |
If I look at this correctly, only char_traits<char> is defined in the standard. https://en.cppreference.com/w/cpp/string/char_traits |
Your patch looks sane. OTOH it might also make sense to provide LOB ctors only for std::string and std::wstring. |
This fixes compilation against libcxx 19, which removed the specialization for std::char_traits<unsigned char>. See https://reviews.llvm.org/D157058. Closes pocoproject#4722.
This fixes compilation against libcxx 19, which removed the specialization for std::char_traits<unsigned char>. See https://reviews.llvm.org/D157058. Closes pocoproject#4722.
This fixes compilation against libcxx 19, which removed the specialization for std::char_traits<unsigned char>. See https://reviews.llvm.org/D157058. Closes pocoproject#4722.
This fixes compilation against libcxx 19, which removed the specialization for std::char_traits<unsigned char>. See https://reviews.llvm.org/D138307 and https://reviews.llvm.org/D157058. Closes pocoproject#4722.
I've opened a PR. Feel free to close it if you have a better solution. I tried to add a constructor that takes std::string specifically to LOB with a specialization but then realized specializations don't work like that so I assume that would have to be done using enable_if too :^) |
This fixes compilation against libcxx 19, which removed the non-standard specializations for std::char_traits including the one for unsigned char, which would get instantiated for BLOB. See https://reviews.llvm.org/D138307 and https://reviews.llvm.org/D157058. Closes pocoproject#4722.
Describe the bug
With LLVM/Clang/libcxx 19.1.0 on Gentoo Linux, POCO fails to compile with the following error:
This error occurs because of this line which instantiates std::basic_string<unsigned char> for BLOB which is not defined in libcxx.
I have a patch here that disables that constructor in case basic_string<T> is not instantiable and fixes compilation.
However I'm not sure if it isn't my system that's hosed in some way since a complete compilation failure would have surely been caught already since libcxx is used for Mac builds, right?
To Reproduce
Compile POCO with clang 19 linking against libcxx.
Expected behavior
POCO compiles
Logs
https://940705.bugs.gentoo.org/attachment.cgi?id=904816
Please add relevant environment information:
Additional context
Gentoo bug 940705
The text was updated successfully, but these errors were encountered: