Returning from a noreturn function
suggest changeExample from the Standard, [dcl.attr.noreturn]:
[[ noreturn ]] void f() {
throw "error"; // OK
}
[[ noreturn ]] void q(int i) { // behavior is undefined if called with an argument <= 0
if (i > 0)
throw "positive";
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents