|
HikoGUI
A low latency retained GUI
|
#include <hikogui/utility/defer.hpp>
Public Member Functions | |
| defer (defer &&)=delete | |
| defer (defer const &)=delete | |
| defer & | operator= (defer &&)=delete |
| defer & | operator= (defer const &)=delete |
| template<std::invocable<> Func> | |
| defer (Func &&func) noexcept | |
| void | cancel () noexcept |
Defer execution of a lambda to the end of the scope.
c++ guarantees the destruction of local objects in a compound statement (block) at the closing brace, in reverse order of declaration. This means that multiple defer instances will call their lambdas in reverse order of declaration as well.