![]() |
Sleipnir C++ API
|
#include <sleipnir/util/scope_exit.hpp>
Public Member Functions | |
| scope_exit (F &&f) noexcept | |
| scope_exit (scope_exit &&rhs) noexcept | |
| scope_exit (const scope_exit &)=delete | |
| scope_exit & | operator= (const scope_exit &)=delete |
| void | release () noexcept |
scope_exit is a general-purpose scope guard intended to call its exit function when a scope is exited.
| F | Function type. |
|
inlineexplicitnoexcept |
Constructs a scope_exit.
| f | Function to call on scope exit. |
|
inlinenoexcept |
Move constructor.
| rhs | scope_exit from which to move. |
|
inlinenoexcept |
Makes the scope_exit inactive.