Junior — Senior
Destructor behavior when throwing an exception
livecode
Task condition
What will be the result when the following code is executed?
void destructor_check()
{
struct A {
~A() noexcept(false) {
throw 1;
}
};
try {
A a;
throw std::exception("~("); // active exception
} catch (...) {
}
}