title: Problem with boost::bind
body: <p>The following code throws an error at the line where I want to create a functor object of <code>Test::fun2</code>:</p>
  
  <pre><code>#include &lt;boost/shared_ptr.hpp&gt;
  #include &lt;boost/bind.hpp&gt;
  #include &lt;boost/function.hpp&gt;
  
  using namespace boost;
  
  class Test
  {
  
  public:
   float fun1() { return 0.0f; }
   void fun2( float x ) {}
  
  };
  
  int main( int argc, char* argv[] )
  {
  
   shared_ptr&lt;Test&gt; p = shared_ptr&lt;Test&gt;( new Test );
  
   function&lt;float(void)&gt; f1 = bind( &amp;Test::fun1, p );
   function&lt;void(float)&gt; f2 = bind( &amp;Test::fun2, p );
  
   return 1;
  
  }
  </code></pre>
  
  <p>The compiler gives me a set of template errors and </p>
  
  <pre><code>`void (Test::*)(float)' is not a class, struct, or union type
  </code></pre>
  
  <p>which seems to be the main error. Nevertheless I have no idea what's the problem here and how to solve it. </p>