summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C
blob: 6b822a1f7778fd781113d2dffe51b573714ad907 (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
27
// PR c++/55419
// { dg-options -std=c++11 }

struct P
{
  P () = default;
  explicit constexpr P (int x) : p (x) {}
  int p;
};

struct Q
{
  constexpr Q () : q (0x7f) {}
  int q;
};

struct R
{
  Q q;
  P p;
};

void
foo (R *x)
{
  *x = {};
}