|
kaycxx-core
C++ core library
|
Executes a callback when the current scope exits. More...
#include <kaycxx/core/scope.hpp>
Public Member Functions | |
| scope_exit (F callback) | |
| Creates a scope guard that runs the callback during destruction. | |
| scope_exit (const scope_exit &)=delete | |
| scope_exit & | operator= (const scope_exit &)=delete |
| scope_exit (scope_exit &&)=delete | |
| scope_exit & | operator= (scope_exit &&)=delete |
Executes a callback when the current scope exits.
This is a small replacement for std::scope_exit and should become obsolete once the supported compilers and standard libraries provide the official implementation.
|
inlineexplicit |
Creates a scope guard that runs the callback during destruction.
| callback | - The callback to run when the scope guard is destroyed. |