1 2 3 4 5 6 7 8 9 10 11 12 13
// Build don't link: // excess errors test struct foo { template<typename T> T bar() { return staticbar<T>( this ); } template<typename T> static T staticbar( foo* ) { return 0; } }; void f() { foo t; int k = t.bar<int>(); }