stdc++compat.cpp defines __throw_out_of_range_fmt: https://dxr.mozilla.org/mozilla-central/source/build/unix/stdc++compat/stdc++compat.cpp#148 We should probably move this into memory/mozalloc/throw_gcc.h with all the other STL throw wrappers.
I tried doing this today and found: /opt/build/froydnj/build-rust-mc/dist/include/mozilla/throw_gcc.h: In function ‘void std::__throw_out_of_range_fmt(const char*, ...)’: /opt/build/froydnj/build-rust-mc/dist/include/mozilla/throw_gcc.h:130:1: error: function ‘void std::__throw_out_of_range_fmt(const char*, ...)’ can never be inlined because it uses variable argument lists __throw_out_of_range_fmt(char const* fmt, ...) so we'd need to create a throw_gcc.cpp similar to our MSVC wrapper implementation. At which point it seems like we almost might as well keep it in stdc++compat.cpp. Or should we just implement throw_gcc.cpp?
The latter, please.
2 years ago