title: attempting to reassign std::function with std::bind and getting error "attempting to reference a deleted function"
body: <p>I'm trying to use function pointers to a class member function and then use std::bind to call that function on an object of that class in a separate function. Within this separate function, I can bind the object and function pointer once, and then a second time in Xcode, but not with MSVS2015...</p>
  
  <p>Here is some basic code that reproduces the issue I'm having. Everything compiles and runs fine on Xcode:</p>
  
  <pre><code>class AClass
  {
  public:
      bool isNumber1()
      {
          return num == 1 ? true : false;
      }
  
  private:
      int num;
  };
  
  typedef bool (AClass::*isFunction)();
  
  bool checkIsFunc (AClass&amp; object, isFunction function)
  {
      auto f = std::bind(function, object);
  
      f = std::bind(function, object); // Error occurs here
  
      return f();
  }
  
  int main (int argc, char* argv[])
  {
  
      AClass obj;
  
      bool outcome = checkIsFunc(obj, &amp;AClass::isNumber1);
  
      return 0;
  }
  </code></pre>
  
  <p>However, with MSVS2015, I get the following error:</p>
  
  <pre><code>error C2280: 'std::_Bind&lt;true,bool,std::_Pmf_wrap&lt;bool (__thiscall AClass::* )(void),bool,AClass,&gt;,AClass &amp;&gt; &amp;std::_Bind&lt;true,bool,std::_Pmf_wrap&lt;bool (__thiscall AClass::* )(void),bool,AClass,&gt;,AClass &amp;&gt;::operator =(const std::_Bind&lt;true,bool,std::_Pmf_wrap&lt;bool (__thiscall AClass::* )(void),bool,AClass,&gt;,AClass &amp;&gt; &amp;)': attempting to reference a deleted function
  </code></pre>
  
  <p>Any ideas what I am doing wrong here or why this works in Xcode but not VS?</p>
  
  <p>Thanks!</p>
  
  <p>Jim</p>