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?

A

It does not compile: a throw inside a noexcept function is ill-formed

B

std::terminate is called and the program aborts; caught and done never print, and whether guard prints first is implementation-defined

C

Prints guard, then caught, then done

D

Prints caught, then done; noexcept only enables optimizations