|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-10-15 17:16:55
Andrey Semashev wrote:
...
> >>> Source:
> >>>
> >>> https://github.com/Lastique/scope
> >>>
> >>> Docs:
> >>>
> >>> https://lastique.github.io/scope/libs/scope/doc/html/index.html
...
> I have now merged scope_check into scope_exit, as you suggested. There
> is already a lightweight scope_final guard, so making scope_exit more
> feature-rich seemed like a good idea. Thanks for the suggestion.
In principle, the implementation can specialize scope_exit for the
default case of always_true, so it doesn't have to be any less efficient
than before.
> Also, for anyone interested, I have created a single-header version of
> the library that is compatible with godbolt.org:
>
> https://godbolt.org/z/6rvhnTrvn
>
> Feel free to try it online.
>
> PS: The single-header version is not part of the library, as proposed
> for inclusion into Boost. It's just to simplify the review process.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk