6 Oct
2008
6 Oct
'08
3:45 p.m.
2008/10/6 Steven Watanabe
template<class T> struct wrap {};
struct connect_f { typedef void result_type; template
void operator()(Producer* producer, Self* self, const wrap<T>&) const { producer->connect(self->get_promise<T>()); } }; ...
boost::mpl::for_each
mpl::_1 >(boost::bind(connect_f, &Producer, this, _1));
You can use boost::mpl::make_identity instead of wrap. Roman.