a helper class to perform actions on scope exit More...
#include <userver/utils/fast_scope_guard.hpp>
Public Member Functions | |
constexpr | FastScopeGuard (Callback callback) noexcept |
constexpr | FastScopeGuard (FastScopeGuard &&other) noexcept |
constexpr FastScopeGuard & | operator= (FastScopeGuard &&other) noexcept |
constexpr void | Release () noexcept |
a helper class to perform actions on scope exit
The lambda argument must be explicitly marked as noexcept
. Only use FastScopeGuard if it's proven that the lambda body is noexcept
, otherwise use ScopeGuard.
Usage example:
Definition at line 26 of file fast_scope_guard.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 36 of file fast_scope_guard.hpp.
|
inlineconstexprnoexcept |
Definition at line 39 of file fast_scope_guard.hpp.
|
inline |
Definition at line 51 of file fast_scope_guard.hpp.
|
inlineconstexprnoexcept |
Definition at line 43 of file fast_scope_guard.hpp.
|
inlineconstexprnoexcept |
Definition at line 55 of file fast_scope_guard.hpp.