, , MyMessageInterface<T> MyMessageHandler.
We need to insert a set of names in MyMessageHandler so that we can form a set of overloads with these names.
The first approach may be to do something like: using TMessageInterface<T>::processMsg;...but, of course, this is not legal.
My suggestion was to do what @ Jarod42 did to invoke functions recursively processMsg, or you can do:
template <typename... Ts>
struct MyMessageHandler : MyMessageInterface<Ts>... {
template <typename Msg>
void processMsg(const Msg &msg) {
MyMessageInterface<Msg>::processMsg(msg);
}
};
which calls a specific base class processMsg.
source
share