
On Tue, Feb 5, 2013 at 11:11 AM, Evgeny Panasyuk <evgeny.panasyuk@gmail.com> wrote:
uncaught_exception_count allow us to implement scope(failure) and scope(success) features from D language in C++. ( previous discussion is at http://boost.2283326.n4.nabble.com/scope-exit-D-style-scope-failure-and-scop...
I'm not an expert on D but Google tells me that it doesn't support automatic deterministic termination. So, if you have a file or a handle open, you need scope(exit) to close it. It also means that the programmer must keep track of all non-memory resources and dispose them "manually" like a C programmer. In C++, RAII makes scope(exit) unnecessary, and catch(...) is the same as scope(failure). Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode