| 1 |
// { dg-do compile } |
| 2 |
// Contributed by Matty T. <mattyt-bugzilla at tpg dot com dot au> |
| 3 |
// PR c++/13813 [DR206]: Check semantic constraints of members of |
| 4 |
// non-dependent type at instantiation time. |
| 5 |
|
| 6 |
|
| 7 |
// DR206 explains that this is ill-formed, no diagnostic required. We emit |
| 8 |
// a diagnostic instead. |
| 9 |
class E; |
| 10 |
template < class A > class Z { |
| 11 |
A a; |
| 12 |
E e; // { dg-error "incomplete type" } |
| 13 |
}; |
| 14 |
|
| 15 |
|
| 16 |
// Nested classes are always dependent names. |
| 17 |
template < class A > class Y { |
| 18 |
class F; |
| 19 |
F e; // { dg-bogus "" "nested classes are always dependent, see DR108 and DR224" } |
| 20 |
}; |