The best that you can do with a runtime id is:
template<class Args...>
void A::connect(SignalIds id, const Args& args...) {
switch(id) {
case VoidSignal: m_voidSignal.connect(args...); break;
case StringSignal: m_stringSignal.connect(args...
); break;
}
}
I've already thought of this.
If you can use compile time constants instead of runtime values,
you can use indices into a fusion::vector.
The SignalId I'm talking about is a compile time constant (an enum)
I'm trying this, but could not get anywhere for the past few days. Any pointers on this ?
Thanks,
Surya
Surya