// Build don't link: template struct A { int fooo (int x); int x; inline int y () { return 3; } inline int z () { return 5; } }; template int A::fooo (int t) { return (this->*(x?&A::y : &A::z))() + t; }; // gets bogus error A ai; int frop () { return ai.fooo (100); }