During the C++20 cycle P0052 Generic Scope Guard and RAII Wrapper for the Standard Library added 4 types: scope_exit
, scope_fail
, scope_success
and unique_resource
to LTFSv3. In the intervening time, two standard libraries have implemented support as well as Boost. With the imperative for safety and security in C++ developers need every tool in the toolbox. The authors believe it is time to move this facility into the standard. The paper will re-examine the five year old design and any learning from deployment of the LTFSv3.
For discussions of this library see:
- TS design and wording paper p0052 - Generic Scope Guard and RAII Wrapper for the Standard Library
- TS adoption paper p1411 - Please reconsider for C++20
- pointer to GSL (todo)
- Boost.scope