Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/nested3.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 template <class T1, class T2> |
2 class A { | |
3 template <class S> | |
4 class SubA { | |
5 int _k; | |
6 }; | |
7 T1 _t1; | |
8 T2 _t2; | |
9 }; | |
10 | |
11 template <class U> | |
12 class B { | |
13 class SubB1 { | |
14 B _i; | |
15 }; | |
16 | |
17 class SubB2 { | |
18 int _j; | |
19 }; | |
20 A<U,SubB1>::SubA<SubB2> _a; // { dg-error "not a base type" "not base" } | |
21 // { dg-message "note" "note" { target *-*-* } .-1 } | |
22 // { dg-error "non-template" "non-template" { target *-*-* } .-2 } | |
23 }; | |
24 | |
25 | |
26 int main() { | |
27 B<char> objB; | |
28 | |
29 return 0; | |
30 } |