Boost signals and passing class method

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2010-06-15T17:06:46Z Indexed on 2010/06/15 17:12 UTC
Read the original article Hit count: 294

Filed under:
|
|

Hello, I've defined some signal:

typedef boost::signals2::signal<void (int temp)> SomeSig;
typedef SomeSig::slot_type SomeSigType;

I have some class:

class SomeClass
{
   SomeClass()
   {
     SomeSig.connect(&SomeClass::doMethod);
   }
   void doMethod(const SomeSig &slot);
};

And got a lot of errors:

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

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost