title: Boost signals and passing class method
body: <p>I've defined some signal:</p>
  
  <pre><code>typedef boost::signals2::signal&lt;void (int temp)&gt; SomeSig;
  typedef SomeSig::slot_type SomeSigType;
  </code></pre>
  
  <p>I have some class:</p>
  
  <pre><code>class SomeClass
  {
     SomeClass()
     {
       SomeSig.connect(&amp;SomeClass::doMethod);
     }
     void doMethod(const SomeSig &amp;slot);
  };
  </code></pre>
  
  <p>And got a lot of errors:</p>
  
  <pre><code>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
  </code></pre>
  
  <hr>
  
  <p><strong>UPD</strong>:
  New code (the same error):</p>
  
  <pre><code>typedef boost::signals2::signal&lt;void (int keyCode)&gt; SigKeyPressed;
  typedef SigKeyPressed::slot_type SigKeyPressedType;
  
  class SomeClass
  {
          SigKeyPressed mSigKeyPressed;
  
      public:
          SomeClass() { mSigKeyPressed.connect(&amp;SomeClass::keyPressed); }
          void keyPressed(const SigKeyPressedType &amp;slot);
  };
  </code></pre>