Hi.
I've got some template class and I try to pass value to them.
the main derive class is define here:
template <typename ... Args>
class TimeOutNodeArgs : public TimeOutNode {
TimeOutNodeArgs<Args...>(){};
~TimeOutNodeArgs() {delete this;}
friend class TimeOut;
MicroTuple<Args...> args;
ParamsPack<Args...> pack;
void callbackTrigger() { /*if(pack.func)*/ pack.getPack();}; //bool overload todo
};
then, in another class that manage all node class, I create new instance of nodes. the one that gave mer trouble in with this derived class.
In that class, I create pointer of derive class, then assign value with curly brace. that method was working with initialization but do not seem to work with assignment, so it is what is look like if I try to read it... but it still compile. That is the thing I found strange... :
void timeOut(unsigned long _delay, void (*_callback)(Args ... args), Args ... args){
TimeOutNodeArgs<Args...> *derivedNode = new TimeOutNodeArgs<Args...> ;
print<Args...>(args...); / can get the ... value
derivedNode->args = { args... };
Serial.println(derivedNode->args.template get<1>()); //don't print the value...
};
am I missing something ? should I write a full constructor instead? of set value function...
Regards
Nitrof