struct A { int x; };
struct B { int y; };

int & Get(A & a) { return a.x; }
int & Get(B & b) { return b.y; }

template <class T> class C
{
T obj;
public:
int func(void) { return Get(obj); }
};