No Handler Above
#include <cstdio>
struct Guard { ~Guard() { std::puts("guard"); } };
void risky() noexcept {
Guard g;
throw 42;
}
int main() {
try { risky(); }
catch (int) { std::puts("caught"); }
std::puts("done");
}
This compiles (with a warning). What does running it do?
Sign in to answer questions and track your progress
Sign In