stdex
Additional custom or not Standard C++ covered algorithms
|
Executes one lambda immediately, and another when exiting the scope. More...
#include <stdex/scoped_executor.hpp>
Public Member Functions | |
scoped_executor (F_init &&init, F_done &&done) | |
Executes init immediately and saves done for destructor. | |
~scoped_executor () | |
Executes done lambda. | |
Executes one lambda immediately, and another when exiting the scope.
\typeparam F_init Lambda to execute immediately \typeparam F_done Lambda to execute when exiting the scope
|
inline |
Executes init immediately and saves done for destructor.
[in] | init | Lambda to execute immediately |
[in] | done | Lambda to execute in destructor |