(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp1y/
constexpr-array7.C
// PR c++/71504
// { dg-do compile { target c++14 } }

template <typename A>
constexpr auto
sum (A const &a)
{
  int tot = 0;
  for (auto &row : a)
    for (auto elem : row)
      tot += elem;
  return tot;
}

constexpr int const a22[2][2] = {{1,2},{3,4}};
static_assert (sum(a22) == 10, "badsum");