summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/template15.C
blob: ce2d130360fb6ed301af415454f1887b0cedb103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do compile }
// Contributed by: Peter Schmid 
//   <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
// PR c++/14545: constructor calls are not integer constant expressions

struct A1 { A1(); }; 
struct A2 { }; 

template <class T> 
struct B
{ 
  void foo() { 
    A1();
    A1 a1 = A1(); 

    A2();
    A2 a2 = A2(); 

    int();
    int a3 = int();
    float();
    float a4 = float();
  } 
}; 

template struct B<void>;