Merge from mainline.
[official-gcc.git] / gcc / testsuite / g++.dg / template / error2.C
blob0f3e975cd4ff843429db936dcdf8e263e31ca368
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Aug 2003 <nathan@codesourcery.com>
6 // instantiated from did not indicate the nested class
8 template<class T> struct X
10   T m; // { dg-error "" "" }
13 template<class T >
14 struct Derived
16   class Nested : public X<T>
17   { // { dg-error "instantiated" "" }
18   };
19   
20   Nested m; // { dg-error "instantiated" "" }
21   
22   void Foo ();
25 void Foo (Derived<void> &x)
27   x.Foo (); // { dg-error "instantiated" "" }