blob: eb5cf3c245cee917341d03310a7dda3f955082c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// { dg-do compile }
// Origin: priesnit@math.uni-goettingen.de
// PR c++/5767: ICE parsing typename with invalid scope.
template <template <typename> class TP>
struct A
{
template <typename T>
struct Template
{
typedef typename TP<T>::Type Type;
};
};
template <template <typename> class TP>
struct B
{
template <typename T>
struct Template
{
typedef typename A<A<TP>::Template> // { dg-error "mismatch|class template" }
::template Template<T>::Type Type; // { dg-error "" }
};
};
template <typename T>
struct C
{
typedef void Type;
};
int main()
{
typedef B<C>::Template<void>::Type Type; // { dg-error "does not name a type" }
}
|