title: How to directly bind a member function to an std::function in Visual Studio 11?
body: <p>I can easily bind member functions to a <code>std::function</code> by wrapping them with a lambda expression with capture clause.</p>
  
  <pre><code>class Class
  {
      Class()
      {
          Register([=](int n){ Function(n); });
      }
  
      void Register(std::function&lt;void(int)&gt; Callback)
      {
  
      }
  
      void Function(int Number)
      {
  
      }
  };
  </code></pre>
  
  <p>But I want to bind them directly, something like the following.</p>
  
  <pre><code>// ...
  Register(&amp;Class::Function);
  // ...
  </code></pre>
  
  <p>I think according to the C++11 standard, this should be supported. However, in Visual Studio 11 I get these compiler errors.</p>
  
  <blockquote>
    <p>error C2440: 'newline' : cannot convert from 'int' to 'Class *'</p>
    
    <p>error C2647: '.*' : cannot dereference a 'void (__thiscall Class::* )(int)' on a 'int'</p>
  </blockquote>