summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-base5.C
blob: 84700bccff76fe3fe5abafb2c5b2ef51336cc127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/80829
// { dg-do compile { target c++11 } }

struct A {
  constexpr A(int a) : _a(a) {}
  int _a;
};

struct B : public A {
  constexpr B(int a) : A(a) {}
};

int main() {
  constexpr A a = B(10);
}