In: template<typename T> struct F { typedef T G; }; template<typename U> struct H { static F<int> f; typedef typeof(f) A; typename A::G v1; typename typeof(f)::G v3; };
you get: ~/ootbc/members/src$ g++ foo.cc foo.cc:8: error: expected nested-name-specifier before "typeof" foo.cc:8: error: ISO C++ forbids declaration of `G' with no type foo.cc:8: error: invalid use of `::' foo.cc:8: error: expected `;' before "v3" although the doc says that "typeof(...)" may be used anywhere a type may be. Ivan -- Summary: "typeof" fails as qualifier Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20551