|
Boost : |
Subject: Re: [boost] [scope_exit] D-style scope(failure) and scope(success) in C++
From: Sergey Cheban (s.cheban_at_[hidden])
Date: 2012-10-10 18:31:52
10.10.2012 23:47, Evgeny Panasyuk пиÑеÑ:
> I have just checked Boost.ScopeExit on-line manual
> (http://www.boost.org/doc/libs/1_51_0/libs/scope_exit/doc/html/index.html).
> Approximately 14 of 16 BOOST_SCOPE_EXIT* samples in manual are in fact
> emulations of SCOPE_FAILURE and SCOPE_SUCCESS.
Yes, SCOPE_FAILURE seems to be useful. But could you please provide an
use case for the SCOPE_SUCCESS? It seems to me that it is better to
place SUCCESS code at the end of the scope. Note also that the
exceptions cannot be thrown from the SCOPE_SUCCESS.
-- Best regards, Sergey Cheban
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk