Why does below code does not compile in Visual Studio 2015.
The same code works properly if ran on ideone.
class FooMutex
{
std::mutex stm;
public:
void foo() {}
};
int main()
{
FooMutex o;
std::thread t1(&FooMutex::foo, o);
}
Error is: C2664 'std::tuple<void (__thiscall FooMutex::* )(void),FooMutex>::
tuple(std::tuple<void (__thiscall FooMutex::* )(void),FooMutex> &&)'
: cannot convert argument 1 from 'void (__thiscall FooMutex::* )(void)' to 'std::allocator_arg_t'