]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.old-deja/g++.pt/tt2.C
pt.c (check_nontype_parm): New function.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / tt2.C
1 // Build don't link:
2
3 int f1 () {
4 struct A {
5 A() : b (2) { }
6 int fred () { return b.hi_mom; }
7 struct B {
8 int hi_mom;
9 B (int a) { hi_mom = a; }
10 };
11 B b;
12 };
13 A aa;
14 return aa.fred();
15 }
16
17 int f2 () {
18 struct A {
19 ~A() { a = 3; }
20 int a;
21 int fred () { return a + 1; }
22 };
23
24 A ab;
25 ab.a = 12;
26 return ab.fred();
27 }
This page took 0.077315 seconds and 5 git commands to generate.