void foo(); class Foomatic() { void bar(); void baz() { std::thread a(foo); // this compiles std::thread b(Foomatic::bar, this); // this doesn't std::thread c(&Foomatic::bar, this); // and this compiles // ... } }; I know that the correct syntax for the pointer to member function is &Foomatic::bar.
But why exactly is Foomatic::bar incorrect? What does that one return? And why exactly is the &Foomatic::bar the correct one? It seems counter-intuitive to me.
This is not a duplicate. The question you linked to answers what the correct syntax is, not explaining the reasons why.
I'm asking why C++ is so inconsistent here, I already know what the syntax is.
a(foo)works, when it should have beena(&foo)?