1struct x { 2 int foo () {} 3}; 4 5template <class T> 6struct vector { 7 T& bar () {} 8}; 9 10template <class T> 11struct y { 12 typedef struct { 13 x t; 14 } s; 15 16 vector<s> array; 17 18 int foo () 19 { return array.bar().t.foo(); } 20}; 21int i = y<x>().foo (); 22