summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/member4.C
blob: 290fbb566c23b46b9cf0ba20fbe1728efe45729c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile }
// Contributed by Matty T. <mattyt-bugzilla at tpg dot com dot au>
// PR c++/13813 [DR206]: Check semantic constraints of members of 
//   non-dependent type at instantiation time.


// DR206 explains that this is ill-formed, no diagnostic required. We emit
//  a diagnostic instead.
class E; 
template < class A > class Z { 
  A a;
  E e;   // { dg-error "incomplete type" }
};


// Nested classes are always dependent names.
template < class A > class Y { 
  class F; 
  F e;   // { dg-bogus "" "nested classes are always dependent, see DR108 and DR224" }
};