summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C
blob: 3ea75432a226d1f40b033e7f3839c42ba14fe2c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/46293
// { dg-options -std=c++0x }

struct A
{
};

struct C
{
  int i;
  constexpr C(int i): i(i) {}
};

struct B: A, C
{
  constexpr B(): A(), C(42) { }
};

constexpr B b{};