gcc/testsuite/g++.dg/template/typename13.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 | struct B; |
| 9 | typedef typename B::type type; |
| 10 | }; |
| 11 | |
| 12 | template <typename T> struct A<T>::B |
| 13 | { |
| 14 | typedef typename A<T>::type type; |
| 15 | |
| 16 | type Foo (); |
| 17 | }; |
| 18 | |
| 19 | template <typename T> |
| 20 | typename A<T>::B::type |
| 21 | A<T>::B::Foo () |
| 22 | { |
| 23 | return 0; |
| 24 | } |