std::unexpected
Min standard notice:
Header: <exception>
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.
# Declarations
void unexpected();
(until C++11)
[[noreturn]] void unexpected();
(deprecated in C++11) (removed in C++17)
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 2111 | C++11 | effect of calling std::set_unexpected during stackunwinding differs from C++98 and breaks some ABIs | made unspecified |