Ошибки: < /p>
1>d:\dummy\project1\trash.cpp(37): warning C4101: 'd': unreferenced local variable
1>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>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::_Execute(std::tuple &,std::integer_sequence)' being compiled
1> with
1> [
1> _Target=std::unique_ptr,
1> _Ty=::size_t
1> ]
1>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::_Execute(std::tuple &,std::integer_sequence)' being compiled
1> with
1> [
1> _Target=std::unique_ptr,
1> _Ty=::size_t
1> ]
1>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::_Run(std::_LaunchPad *) noexcept'
1> with
1> [
1> _Target=std::unique_ptr
1> ]
1>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::_Run(std::_LaunchPad *) noexcept' being compiled
1> with
1> [
1> _Target=std::unique_ptr
1> ]
1>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' being compiled
1> with
1> [
1> _Target=std::unique_ptr
1> ]
1>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(_Thrd_t *,_Target &&)' being compiled
1> with
1> [
1> _Ty=std::tuple,
1> _Target=std::unique_ptr
1> ]
1>d:\trash\project1\trash.cpp(26): note: see reference to function template instantiation 'std::thread::thread(_Fn &&,C &)' being compiled
1> with
1> [
1> _Fn=void (__thiscall A::* )(C)
1> ]
1>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 &&,_Types &&...) noexcept()'
1>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>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>c:\program files (x86)\microsoft visual studio\2017\community1\vc\tools\msvc\14.11.25503\include\thr\xthread(240): note: '_Types={C}'
1>Done building project "Project1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
< /code>
Код: < /p>
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 &c)
{
auto thread1 = std::thread(&A::solve,c);
thread1.join();
}
};
int main()
{
B b;
C c;
D d;
}
< /code>
Спасибо за ваше время!

Подробнее здесь: https://stackoverflow.com/questions/474 ... tdinvoke-c