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
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