Я определил некоторый сигнал:
typedef boost::signals2::signal<void (int temp)> SomeSig;
typedef SomeSig::slot_type SomeSigType;
У меня есть класс:
class SomeClass
{
SomeClass()
{
SomeSig.connect(&SomeClass::doMethod);
}
void doMethod(const SomeSig &slot);
};
И я получил много ошибок:
error: ‘BOOST_PP_ENUM_SHIFTED_PARAMS_M’ was not declared in this scope
error: ‘T’ was not declared in this scope
error: a function call cannot appear in a constant-expression
error: a function call cannot appear in a constant-expression
error: template argument 1 is invalid
error: ‘BOOST_SIGNALS2_MISC_STATEMENT’ has not been declared
error: expected identifier before ‘~’ token
error: expected ‘)’ before ‘~’ token
error: expected ‘;’ before ‘~’ token
UPD : новый код (та же ошибка):
typedef boost::signals2::signal<void (int keyCode)> SigKeyPressed;
typedef SigKeyPressed::slot_type SigKeyPressedType;
class SomeClass
{
SigKeyPressed mSigKeyPressed;
public:
SomeClass() { mSigKeyPressed.connect(&SomeClass::keyPressed); }
void keyPressed(const SigKeyPressedType &slot);
};