9 Oct
2023
9 Oct
'23
3:33 p.m.
Andrey Semashev wrote:
Source:
https://github.com/Lastique/scope
Docs:
https://lastique.github.io/scope/libs/scope/doc/html/index.html
Question: What is the difference between scope_check<F, C>, scope_success<F, C> and scope_fail<F, C>? Why do we need the second template parameter of the latter two if scope_check is provided? Wouldn't it be clearer if scope_success and scope_fail took a single F parameter? Also, wouldn't it be better if scope_exit took a second parameter C defaulting to "always" instead of having scope_check?