Boost logo

Boost :

Subject: Re: [boost] very simple implementation of Andrei Alexandrescu's ScopeGuard idiom
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-09-03 23:28:56


On Mon, Sep 3, 2012 at 8:02 PM, Sergey Radionov <rsatom_at_[hidden]> wrote:
> 2012/9/4 Lorenzo Caminiti <lorcaminiti_at_[hidden]>:
>> On Mon, Sep 3, 2012 at 6:37 PM, Sergey Radionov <rsatom_at_[hidden]> wrote:
>> OK if that's what you need but that's not the problem that ScopeExit
>> is trying to solve to "call a function on scope exit".
>
> I am not try to tell that ScopeExit is useless, just "choose right
> tool for corresponding work "

Sure, and it's entirely up to you to decide if/when Scope Exit is the
right tool for you to use. Keep in mind that the "work" Scope Exit is
set to do is to execute arbitrary code on enclosing scope exit.

--Lorenzo


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