2 // Special g++ Options:
4 // Copyright (C) 1999 Free Software Foundation
6 // by Alexandre Oliva <oliva@dcc.unicamp.br>
7 // based on bug report by Nick Rasmussen <nick@jive.org>
9 // This is slightly different from typename1.C. This one tests
10 // whether the implicit typename extension works. gcc 2.95 reports:
12 // warning: lookup of `foo' finds `struct foo'
13 // warning: instead of `baz<T>::foo' from dependent base class
14 // warning: (use `typename baz::foo' if that's what you meant)
16 // But baz<T>::foo is not a base class, and `foo' should have been
17 // found in baz's scope.
21 template <class T> struct bar {
25 template <class T> struct baz {
26 typedef bar<T>::foo foo; // ERROR - implicit typename