
1 Aug
2007
1 Aug
'07
11:10 p.m.
Andrey Semashev wrote:
I'm surprised too. I always though that T U::* and T (U::*)() are very different types. I didn't find in the Standard any notes that they are the same.
A common misconception invented by the authors of GCC, I guess ;-). With MSVC, the type expression 'U C::*' deduced from a member function pointer T (with default options) will surprisingly yields a type incompatible to T (as member functions are implicitly __thiscall attributed, where U C::* becomes __cdecl, because U is the type of a freestanding function and __thiscall only exists for member functions). Regards, Tobias