template <class EventType>
class IEvent;
class IEventable;
typedef boost::function<void (IEventable&, IEvent&)> behaviorRef;
What is the right way for passing template class IEvent into boost function? With this code I get:
error: functional cast expression list treated as compound expression
error: template argument 1 is invalid
error: invalid type in declaration before ‘;’ token
boost::functionneeds a type, so you cannot pass it a template‘s name, it has to be a template instance. So either use a specific instanceor put the whole thing itself into a template: