| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
// Origin: Debian GCC maintainers <[email protected]> |
| 4 |
// Volker Reichelt <[email protected]> |
| 5 |
|
| 6 |
// PR c++/16706: Dependent type calculation during access checking |
| 7 |
|
| 8 |
template<typename> struct A |
| 9 |
{ |
| 10 |
A(); |
| 11 |
template<typename> struct X {}; |
| 12 |
}; |
| 13 |
|
| 14 |
template<typename T> struct B |
| 15 |
{ |
| 16 |
typename A<T>::template X<int> x; |
| 17 |
template<typename> struct C; |
| 18 |
}; |
| 19 |
|
| 20 |
template<typename T> template<typename U> struct B<T>::C<U*> |
| 21 |
{ |
| 22 |
C() {} |
| 23 |
A<int> a; |
| 24 |
}; |
| 25 |
|
| 26 |
template struct B<int>::C<int*>; |