|
opynsim
Unofficial C++ Documentation
|
#include <scope_exit.h>
Public Member Functions | |
| template<typename Fn > requires ( std::destructible<EF> and std::is_constructible_v<EF, Fn> and not std::same_as<std::remove_cvref_t<Fn>, ScopeExit> ) | |
| ScopeExit (Fn &&fn) | |
Constructs a ScopeExit from a function or function object. | |
| ScopeExit (const ScopeExit &)=delete | |
| ScopeExit (ScopeExit &&tmp) noexcept | |
| ScopeExit (ScopeExit &&tmp) noexcept(std::is_nothrow_copy_constructible_v< EF >) | |
| ScopeExit & | operator= (const ScopeExit &)=delete |
| ScopeExit & | operator= (ScopeExit &&) noexcept=delete |
| ~ScopeExit () noexcept | |
| void | release () noexcept |
A general-purpose scope guard intended to call its exit function when a scope is exited - either normally, or via an exception.
This utility class is effectively a rewrite of std::experimental::scope_exit, which is documented here: https://en.cppreference.com/w/cpp/experimental/scope_exit.html
|
inlineexplicit |
Constructs a ScopeExit from a function or function object.
|
delete |
|
inlinenoexcept |
Move constructor. Initializes the stored function with the one in tmp. The constructed ScopeExit is active if and only if tmp is active. After successful move construction, tmp becomes inactive.
|
inlinenoexcept |
Move constructor. Initializes the stored function with the one in tmp. The constructed ScopeExit is active if and only if tmp is active. After successful move construction, tmp becomes inactive.
|
inlinenoexcept |
|
delete |
|
deletenoexcept |
|
inlinenoexcept |