Debian Codegraph @

gcc/testsuite/g++.dg/parse/template15.C

raw
1 // { dg-do compile }
2 // Contributed by: Peter Schmid
3 // <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
4 // PR c++/14545: constructor calls are not integer constant expressions
5
6 struct A1 { A1(); };
7 struct A2 { };
8
9 template <class T>
10 struct B
11 {
12 void foo() {
13 A1();
14 A1 a1 = A1();
15
16 A2();
17 A2 a2 = A2();
18
19 int();
20 int a3 = int();
21 float();
22 float a4 = float();
23 }
24 };
25
26 template struct B<void>;