This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / g++.dg / parse / template15.C
blobce2d130360fb6ed301af415454f1887b0cedb103
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
6 struct A1 { A1(); }; 
7 struct A2 { }; 
9 template <class T> 
10 struct B
11
12   void foo() { 
13     A1();
14     A1 a1 = A1(); 
16     A2();
17     A2 a2 = A2(); 
19     int();
20     int a3 = int();
21     float();
22     float a4 = float();
23   } 
24 }; 
26 template struct B<void>;