Closed devnexen closed 1 year ago
There's scope_exit in experimental: https://en.cppreference.com/w/cpp/experimental/scope_exit
I guess we could start using it, not sure how far it is from making it to the standard.
looks interesting but I do not have it in my compilers I have the experimental namespace tough.
I'd be happy to merge this if we rename deref
to scope_exit
which seems to be what the standard is currently considering as well as what boost uses.
starting with a scoped callback e.g. when it would become too verbose to close resources for each error case.