template struct A { }; template <> struct A { struct B { int f; }; }; template <> struct A { struct B { int g; }; };