blob: 5f0b5cacf9ecfcb414b2535359b6331bd8f8ba80 [file] [log] [blame]
// Test base/member class and static_assert with constexpr
// { dg-do compile { target c++11 } }
struct A {
int i;
constexpr A(int _i): i(_i) { }
};
struct B: A {
A a;
int j;
constexpr B(int _ib, int _ia, int _j): A(_ib), a(_ia), j(_j) { }
};
constexpr B b (12, 24, 36);
#define SA(X) static_assert (X, #X)
SA(b.i==12 && b.a.i==24 && b.j==36);