Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2023-11-29 16:03:38


On 11/29/23 18:56, Andrey Semashev wrote:
> On 11/29/23 13:14, Janko Dedic via Boost wrote:
>>
>> There is no BOOST_SCOPE_FAIL macro. Why is it missing?
>
> If you mean BOOST_SCOPE_FAIL to be equivalent to BOOST_SCOPE_FINAL but
> only creating scope_fail then I didn't see enough motivation to add it.
> scope_exit/fail/success support scope guard cancellation and also a
> condition function object. This means users these scope guard types
> often want to interact with the scope guard object (to
> activate/deactivate it), and also that the scope guard construction may
> be more elaborate.
>
> Note that scope_exit/fail/success constructors are explicit and may
> accept multiple arguments. This makes them incompatible with the syntax
> used by BOOST_SCOPE_FAIL.

The last sentence should end with BOOST_SCOPE_FINAL.


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