title: Is it possible to bind() *this to class member function to make a callback to C API
body: <p>Is there a way to use boost or std bind() so I could use a result as a callback in C API?
  Here's sample code I use:</p>
  
  <pre><code>#include &lt;boost/function.hpp&gt;
  #include &lt;boost/bind/bind.hpp&gt;
  
  typedef void (*CallbackType)();
  
  void CStyleFunction(CallbackType functionPointer)
  {
      functionPointer();
  }
  
  class Class_w_callback
  {
  public:
      Class_w_callback()
      {
          //This would not work
      CStyleFunction(boost::bind(&amp;Class_w_callback::Callback, this));
      }
      void Callback(){std::cout&lt;&lt;"I got here!\n";};
  };
  </code></pre>
  
  <p>Thanks!</p>