| 1 |
// Copyright (C) 2002 Free Software Foundation |
| 2 |
// Origin: C++/1058 |
| 3 |
// Contributed by Gabriel Dos Reis <[email protected]> |
| 4 |
// { dg-do compile } |
| 5 |
|
| 6 |
struct A { |
| 7 |
typedef int Y; |
| 8 |
typedef double Z; |
| 9 |
}; |
| 10 |
|
| 11 |
struct B { |
| 12 |
template<typename T> |
| 13 |
void func(typename T::Y, typename T::Z) { } |
| 14 |
}; |
| 15 |
|
| 16 |
template<typename T> |
| 17 |
struct X { |
| 18 |
void gunc(); |
| 19 |
}; |
| 20 |
|
| 21 |
template<typename T> |
| 22 |
void X<T>::gunc() |
| 23 |
{ |
| 24 |
B b; |
| 25 |
b.func<A>(0, 3.); |
| 26 |
} |
| 27 |
|
| 28 |
int main() |
| 29 |
{ |
| 30 |
X<int> x; |
| 31 |
x.gunc(); |
| 32 |
return 0; |
| 33 |
} |