2017-06-14 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git] / gcc / testsuite / g++.dg / template / scope2.C
blobad9bf8e9d426ee19a7a152d69e804a1aa8b0ce97
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 15 Aug 2003 <nathan@codesourcery.com>
6 // checked required bases in wrong scope.
8 class Helper {};
10 template<class T> struct X { };
12 template<class T> class Base
14   protected:
15   typedef Helper H;
18 template<class T >
19 struct Derived : Base<T>
21   typedef Base<T> Parent;
22   typedef typename Parent::H H;
23   
24   class Nested : public X<H> {};
25   
26   Nested m;
27   
28   void Foo ();
31 void Foo (Derived<char> &x)
33   x.Foo ();