I'm getting:
error: undefined symbol: void std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::_M_construct<char16_t const*>(char16_t const*, char16_t const*, std::forward_iterator_tag)
compiling the following simple test case:
#include <string> #include <string_view> // static std::u16string clang_string_workaround(const char16_t* a, const char16_t* b) { return {a, b}; } std::u16string_view sv{u"test"}; std::u16string print() { return std::u16string(sv); } int main(int, char**) { std::u16string s = print(); }
on clang 13 and 14.0.0, with clang++ -std=c++20 -o test test.cpp
. It works fine with -std=c++17
. Bizarrely, it also works if you simply uncomment the clang_string_workaround
line which isn't even called. It looks like libstdc++ moved that _M_construct
function into a separate file recently, which might be related.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4