HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
v1::defer< T > Class Template Reference

#include <hikogui/defer.hpp>

Public Member Functions

 defer (defer &&)=delete
 
 defer (defer const &)=delete
 
deferoperator= (defer &&)=delete
 
deferoperator= (defer const &)=delete
 
template<std::invocable<> Func>
constexpr defer (Func &&func) noexcept
 

Detailed Description

template<std::invocable<> T>
class v1::defer< T >

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.


The documentation for this class was generated from the following file: