Consider this snippet:
#include <boost/fusion/container/map.hpp>
#include <boost/fusion/include/pair.hpp>
struct MsgA {};
struct MsgB {};
using MsgList = std::tuple<MsgA, MsgB>;
template <typename Msg>
class MsgSignal {};
template <typename... Args>
using MsgSignals =
boost::fusion::map<boost::fusion::pair<Args, MsgSignal<Args>>, ...>;
int main() {
MsgSignals<MsgList> signals;
// signals should be of type boost::fusion::map<boost::fusion::pair<MsgA, MsgSignal<MsgA>,
boost::fusion::pair<MsgB, MsgSignal<MsgB>>> >
}
I'm struggling with the alias template MsgSignals
.
What is the right syntax such that the type of signals
becomes
boost::fusion::map<boost::fusion::pair<MsgA, MsgSignal<MsgA>,
boost::fusion::pair<MsgB, MsgSignal<MsgB>>>