aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constexpr-init18.C
blob: 47ad11f22905a3e52d4943a4434021047270d059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/96282
// { dg-do compile { target c++20 } }

struct e { bool v = true; bool w; };

template<int N>
struct b { e m[N][N]; };

template<int N>
struct t : b<N> { constexpr t() : b<N>() {} };

constexpr t<1> h1;
static_assert(h1.m[0][0].w == false);

constexpr t<42> h2;
static_assert(h2.m[17][17].w == false);