Clang++/stdlib: runtime_error with and without std::string (original) (raw)
Hi!
I have code which:
- catches this exception (with
catch(const std::exception & e)
)
throw std::runtime_error("lsk");
- but misses this exception (even with
catch(...)
)
throw std::runtime_error(std::string("lsk"));
(No other change in the code than this line.)
That can’t be right, can it?!?
I tried to reduce it to a minimal example, but I haven’t found the combination of templates/inline/exception/etc that causes it yet.
Anybody seen something like this?
I’m on Mac OS X,
Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.5.0