xentara-utils v2.0.4
The Xentara Utility Library
|
A class that executes a callable at destruct time. More...
#include <xentara/utils/tools/Defer.hpp>
Public Member Functions | |
Defer (Callable &&callable) noexcept(std::is_nothrow_move_constructible_v< Callable >) | |
Constructor. | |
Defer (const Callable &callable) noexcept(std::is_nothrow_copy_constructible_v< Callable >) | |
Constructor. | |
~Defer () noexcept(std::is_nothrow_invocable_v< Callable >) | |
Destructor. | |
A class that executes a callable at destruct time.
This class stores a callable object like a lambda and executes it at the end of the block.
Callable | The type of the object. |
|
noexcept |
Constructor.
callable | An object that logs the exception infos |
|
noexcept |
Constructor.
callable | An object that logs the exception infos |
|
noexcept |
Destructor.
The destructor executes the callable