OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / typename14.C
1 // { dg-do compile }
2
3 // Copyright (C) 2007 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 21 Jul 2007 <nathan@codesourcery.com>
5
6 template <typename T> struct A  
7 {
8   typedef const T X;
9   
10   struct B;
11 };
12
13 template <typename T> struct A<T>::B
14 {
15   typedef volatile typename A<T>::X Y;
16
17   T const volatile *Foo ();
18 };
19
20 template<typename T>
21 typename A<T>::B::Y *A<T>::B::Foo ()
22 {
23   return 0;
24 }