Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
Later< T > Struct Template Reference

Defer Additions & Subtractions until access. More...

#include <later.h>

Collaboration diagram for Later< T >:
[legend]

Public Member Functions

get () const
 get value
 

Detailed Description

template<typename T>
struct Later< T >

Defer Additions & Subtractions until access.

this is the poor man's closure for lambda functions

e.g.

int a{8}, b{3}, c{4};
auto op = (Later<int>) a + b - c;
op.get() // -> 7
a = 4;
op.get() // -> 3
Defer Additions & Subtractions until access.
Definition later.h:22

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