gcc/testsuite/g++.dg/template/typename14.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Copyright (C) 2007 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 21 Jul 2007 <[email protected]> |
| 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 | } |