On 11/26/23 15:53, Peter Dimov via Boost wrote:
Andrey Semashev wrote:
Specifically regarding Boost.Scope, the extensions I made are what makes these components practically useful in my real code base. That is, I find the standard components too limiting or inconvenient to be useful in practice.
You have a section in the documentation that compares Scope to ScopeExit, but I don't see a comparison against the proposed standard components.
It might be useful to have one, where the rationale for the additions could naturally fit.
I can add a section discussing differences from the Library Fundamentals TS, though maybe not in the form of a table. https://github.com/Lastique/scope/issues/5 I listed the extensions in my initial announcement of the library. Here they are, for convenience: * A new scope_final scope guard, which is a more lightweight alternative to scope_exit. It is accompanied with the BOOST_SCOPE_FINAL macro that allows to simplify scope guard declaration syntax. * Scope guards can be activated/deactivated multiple times. * Scope guards can be created inactive initially. * Scope guard factory functions, for compatibility with C++11. * Support for custom condition functions for checking scope guards. This, for example, allows one to check for error codes instead of exceptions in scope_fail/scope_success. * Support for optional resource traits in unique_resource wrapper, which improves usage with resources having unallocated values. * unique_resource supports swapping. * unique_resource supports dereferencing for any resource types that support dereferencing, not only pointers. * More flexible constructors for unique_resource.