summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor18.C
blob: fa4ff7cc75ef4a39e18d507b05c18d89167a51bd (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
// PR c++/64994
// { dg-do compile { target c++11 } }

class TimeStamp {
public:
  constexpr TimeStamp() : mValue() {}
  int mValue;
};

class A {
  class B;
  A(bool);
};
class C {
  TimeStamp mFadeBeginTime;
};
class A::B {
public:
  B(int) {}
  TimeStamp mPrevEventTime[1];
};

A::A(bool) {
  new C;
  B(0);
}