title: error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...) noexcept(<expr>)'
body: <p>Below is a certain program that is giving compile time errors. This has to do mostly with function Boo in class D. I am eventually trying to use a number of threads to call the solve method but this does not seem to be working out too well for me at the moment to get that far.</p>
  
  <p>The errors are:</p>
  
  <pre><code>1&gt;d:\dummy\project1\trash.cpp(37): warning C4101: 'd': unreferenced local variable
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): error C2672: 'std::invoke': no matching overloaded function found
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(248): note: see reference to function template instantiation 'void std::_LaunchPad&lt;_Target&gt;::_Execute&lt;0,1&gt;(std::tuple&lt;void (__thiscall A::* )(C),C&gt; &amp;,std::integer_sequence&lt;_Ty,0,1&gt;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;,
  1&gt;            _Ty=::size_t
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(247): note: see reference to function template instantiation 'void std::_LaunchPad&lt;_Target&gt;::_Execute&lt;0,1&gt;(std::tuple&lt;void (__thiscall A::* )(C),C&gt; &amp;,std::integer_sequence&lt;_Ty,0,1&gt;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;,
  1&gt;            _Ty=::size_t
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(244): note: while compiling class template member function 'void std::_LaunchPad&lt;_Target&gt;::_Run(std::_LaunchPad&lt;_Target&gt; *) noexcept'
  1&gt;        with
  1&gt;        [
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(232): note: see reference to function template instantiation 'void std::_LaunchPad&lt;_Target&gt;::_Run(std::_LaunchPad&lt;_Target&gt; *) noexcept' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(259): note: see reference to class template instantiation 'std::_LaunchPad&lt;_Target&gt;' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thread(48): note: see reference to function template instantiation 'void std::_Launch&lt;std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;_Ty&gt;&gt;&gt;(_Thrd_t *,_Target &amp;&amp;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Ty=std::tuple&lt;void (__thiscall A::* )(C),C&gt;,
  1&gt;            _Target=std::unique_ptr&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;,std::default_delete&lt;std::tuple&lt;void (__thiscall A::* )(C),C&gt;&gt;&gt;
  1&gt;        ]
  1&gt;d:\trash\project1\trash.cpp(26): note: see reference to function template instantiation 'std::thread::thread&lt;void(__thiscall A::* )(C),C&amp;,void&gt;(_Fn &amp;&amp;,C &amp;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Fn=void (__thiscall A::* )(C)
  1&gt;        ]
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &amp;&amp;,_Types &amp;&amp;...) noexcept(&lt;expr&gt;)'
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): note: With the following template arguments:
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): note: '_Callable=void (__thiscall A::* )(C)'
  1&gt;c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): note: '_Types={C}'
  1&gt;Done building project "Project1.vcxproj" -- FAILED.
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>The code is:</p>
  
  <pre><code>class C {
  };
  
  class A {
  public:
      virtual void solve(C c) = 0;
  };
  
  class B:A {
  public:
      void solve(C c) {};
  };
  
  class D {
  public:
      void Boo(B* b, C &amp;c)
      {
          auto thread1 = std::thread(&amp;A::solve,c);
          thread1.join();
      }
  };
  
  int main()
  {
      B b;
      C c;
      D d;
  }
  </code></pre>
  
  <p>Thank you for your time! :)</p>