template struct A { typedef int X; }; template struct B { typename A::X x; }; template struct C { void foo(int); B*> b; }; template struct D { enum { e }; void bar() { C::foo(e); } };