* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-data1.C
blob9078533d732731675b4d7e2b283f58e24e03f00f
1 // { dg-do compile { target c++11 } }
3 // From N2235
5 // 1
6 struct A2
8   static const int eights = 888;
9   static constexpr int nines = 999;
12 A2 a;
14 // 2
15 struct pixel
17   int x, y;
19 constexpr pixel ur = { 1294, 1024 }; // OK
21 // p4
22 struct Length
24    explicit constexpr Length(int i = 0) : val(i) { }
25 private:
26    int val;
29 constexpr int myabs(int x)
30 { return x < 0 ? -x : x; }    // OK
32 Length l(myabs(-97)); // OK
34 // p6
35 class debug_flag
37 public:
38    explicit debug_flag(bool);
39    constexpr bool is_on(); // { dg-error "enclosing class .* not a literal type" "" { target c++11_only } }
40 private:
41    bool flag;