【发布时间】:2010-06-14 21:02:19
【问题描述】:
template <class EventType>
class IEvent;
class IEventable;
typedef boost::function<void (IEventable&, IEvent&)> behaviorRef;
将模板类 IEvent 传递给 boost 函数的正确方法是什么?使用此代码,我得到:
error: functional cast expression list treated as compound expression
error: template argument 1 is invalid
error: invalid type in declaration before ‘;’ token
【问题讨论】:
标签: c++ function boost templates