error: cannot convert 'int*' to 'int A::*' for argument '1' to 'void blah(int A::*)'
struct A; void blah(int A::*); struct A{ int a; }; template<typename T> //remove this line to make it work void hoho(){ blah(&A::a); } compiles on gcc up to early 4.0, icc and comeau -- Summary: rejects valid pointer to member Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P1 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sstrasser at systemhaus-gruppe dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20734