Boost logo

Boost Users :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-08-23 02:45:13


Pavel Vozenilek wrote:
> "Johan Nilsson" wrote:
>
>> ScopeGuard-like functionality:
>>
>> - [serious] I strongly believe that an accompanying ScopeGuard-like
>> class accepting a function object should be included with the
>> library. Why not call it "scope_exit", perhaps with support for
>> predicates, e.g.:
>
> #include <boost/multi_index/detail/scope_guard.hpp>
>
> The ON_BLOCK_EXIT/ON_BLOCK_EXIT_OBJ macros
> are missing, unfortunately.
>

I'm aware of the existence of this class. As long as it's only an
implementation detail of a library it's not of much help to library users,
though.

>
> Joshua Lehrer had wrote a ScopeGuard variant that doesn't
> care about the no-object - object duality. It can be found at
> http://www.zete.org/people/jlehrer/scopeguard.html
> (works OK for me).

Sure, but it would be nice if such a thing would be publicly available in
Boost, just using the generalized bind approach. I believe it would fit in
nicely within the ScopeExit library, as long as it isn't called
"scope_guard" ...

/ Johan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net