I want to pass functions (known before compile time) via template (not via function) to a class. In the class I want to call those functions after each other. The functions always have the same type (in this case returns void and pass no arguments). Later on I want to pass functions like this: void foo(uint16_t arg); I've tried two things but I cannot find a solutions.
typedef void(*decodeFunct)(void);
template <uint8_t pin, decodeFunct... functions>
class CIRLremote{
public:
CIRLremote(void){
// empty
}
void begin(void){
// call all decode functions
//functions... ();
call(functions...);
}
void call(decodeFunct f){
f();
}
};