using std::terminate or “how to call that last function before the end of everything”