feat: add initializer list interface to eoFunctorStore

Easier to use while state initialize combined operators.
This commit is contained in:
Johann Dreo 2020-03-24 16:34:01 +01:00
commit 77921fea0c

View file

@ -85,6 +85,14 @@ public:
return this->storeFunctor(f);
}
// Allow to pass initializer lists of pointers, for example for edoCombinedContinue.
template<class Functor, class Args>
Functor& pack( std::initializer_list<Args> args )
{
Functor* f = new Functor(args);
return this->storeFunctor(f);
}
private :
/** no copying allowed */