The constructor parameter exit_func in the following constructors shall be : ‐ a reference to a function ‐ or a reference to a function object([function.objects])
Synopses
Declared in <beman/scope/scope.hpp>
Copy constructor
scope_guard(scope_guard const& other) = delete;
Move constructor
constexpr
scope_guard(scope_guard&& rhs) noexcept(std::is_nothrow_move_constructible_v<ScopeExitFunc> && std::is_nothrow_move_constructible_v<InvokeChecker>)
requires (HasRelease<InvokeChecker> || HasStaticRelease<InvokeChecker>);
Construct from EF
template<typename EF>
constexpr
explicit
scope_guard(EF&& exit_func) noexcept(std::is_nothrow_constructible_v<ScopeExitFunc> && std::is_nothrow_constructible_v<InvokeChecker>)
requires (std::is_default_constructible_v<InvokeChecker> && !std::is_same_v<std::remove_cvref<EF>, scope_guard>);
The constructor parameter exit_func in the following constructors shall be : ‐ a reference to a function ‐ or a reference to a function object([function.objects])
template<
typename EF,
typename CHKR>
constexpr
scope_guard(
EF&& exit_func,
CHKR&& invoke_checker) noexcept(std::is_nothrow_constructible_v<ScopeExitFunc> && std::is_nothrow_constructible_v<InvokeChecker>);