stdex
Additional custom or not Standard C++ covered algorithms
All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
stdex::scoped_executor< F_init, F_done > Class Template Reference

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.
 

Detailed Description

template<typename F_init, typename F_done>
class stdex::scoped_executor< F_init, F_done >

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

Constructor & Destructor Documentation

◆ scoped_executor()

template<typename F_init , typename F_done >
stdex::scoped_executor< F_init, F_done >::scoped_executor ( F_init && init,
F_done && done )
inline

Executes init immediately and saves done for destructor.

Parameters
[in]initLambda to execute immediately
[in]doneLambda to execute in destructor

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