I have the following example:
class test
{
public:
void f() {}
};
std::shared_ptr<test> ptr = std::make_shared<test>();
std::thread t(*ptr, &test::f);
Basically I want a shared_ptr to a class and use thread to invoke a function on that ptr.
But compile is not happy here.
error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...) noexcept(<expr>)'
Anything I am doing wrong here please?