Skip to content

Commit 643050f

Browse files
committed
Remove basic_string<unsigned_char> from embind
Only `char`, `wchar`, `char8`, `char16`, and `char32` are valid specialization for `std::basic_string`: https://en.cppreference.com/w/cpp/string/basic_string But libc++ had a base template for `basic_string` that allows any type to be passed for a long time. It looks there have been several attempts to remove this but they restored it afterwards due to some complaints, in chronological order: llvm/llvm-project@aeecef0 llvm/llvm-project@08a0faf llvm/llvm-project@e30a148 llvm/llvm-project#66153 llvm/llvm-project#72694 The last one, llvm/llvm-project#72694, eventually removed it. So `std::basic_string<unsigned_char>` is not allowed anymore.
1 parent a5f2cbe commit 643050f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

system/lib/embind/bind.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ EMSCRIPTEN_BINDINGS(builtin) {
149149
register_float<double>("double");
150150

151151
_embind_register_std_string(TypeID<std::string>::get(), "std::string");
152-
_embind_register_std_string(
153-
TypeID<std::basic_string<unsigned char>>::get(), "std::basic_string<unsigned char>");
154152
_embind_register_std_wstring(TypeID<std::wstring>::get(), sizeof(wchar_t), "std::wstring");
155153
_embind_register_std_wstring(TypeID<std::u16string>::get(), sizeof(char16_t), "std::u16string");
156154
_embind_register_std_wstring(TypeID<std::u32string>::get(), sizeof(char32_t), "std::u32string");

0 commit comments

Comments
 (0)