Closed hshakula closed 3 years ago
From https://en.cppreference.com/w/cpp/error/unexpected_handler:
std::unexpected() is called by the C++ runtime when a dynamic exception specification is violated: an exception is thrown from a function whose exception specification forbids exceptions of this type.
Since the dynamic exception specification has been removed from C++11, this was deprecated. It is now removed. Effectively its only valid on C++98. And even then I am not sure anybody really used dynamic exception specification!
If you are curious about it for posterity: https://en.cppreference.com/w/cpp/language/except_spec
Fixes #198
My limited testing showed that backward-cpp works fine without the deprecated
std::set_unexpected
. But I cannot guarantee that it would still work for all cases as I was not researching whystd::set_unexpected
was used by backward-cpp and why was it removed from c++17.