C++17
Thanks to int std::uncaught_exceptions(), we can implement action which executes only on success (no thrown exception in scope).
Previously bool std::uncaught_exception() just allows to detect if any stack unwinding is running.
#include <exception>
#include <iostream>
templa...