Boost logo

Boost :

Subject: Re: [boost] [exception] uncaught_exception_count, scope(failure), scope(success)
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2013-02-05 17:57:44


On Tue, Feb 5, 2013 at 1:23 PM, Evgeny Panasyuk
<evgeny.panasyuk_at_[hidden]> wrote:
> 06.02.2013 0:40, Emil Dotchevski:
>
>> I'm not an expert on D but Google tells me that it doesn't support
>> automatic deterministic termination.
>
> Could you please describe what do you mean?

I mean that in D/Java/C#/etc you don't know when the destructor will
get called automatically, which means that you're stuck with having to
manually keep track of all allocated resources exactly like in C,
except for memory.

> While scope(exit) is some kind of ad-hoc replacement for RAII wrappers,
> scope(failure) and scope(success) are not.
> Nowadays scope(failure) and scope(success) are emulated in C++ via
> ScopeGuard idiom.

Could you clarify what does uncaught_exceptions_count() use look like?
How is it different scope guard?

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk