
"Andrey Semashev" wrote:
I purpose to add a generalized scope guard classes to the Boost library. I have a rather simple but flexible implementation of such classes (I've attached the sources). Since I'm new here, I don't really know if they conform some source code conventions in Boost (if any), but if they don't - please, let me know.
I was not able to extract the code (could you add it as attachment or put it into Sandbox?) but FYI: One ScopeGuard implementation (practically copy of Alexandrescu's one) exists inside Multi-Index library (boost/multi_index/detail/scope_guard.hpp). It was intended as "temporary" solution "until someone creates full-features Boost library". ---- A very interesting Scope Guard variant can be found in TnFox library: http://tnfox.sourceforge.net/TnFOX/html/group__rollbacks.html /Pavel