2 // { dg-do compile { target c++14 } }
4 #define assert(X) static_assert((X),#X)
6 #define CONSTEXPR constexpr
8 template <typename T, unsigned long Size>
12 constexpr T const& operator[](unsigned long n) const
15 constexpr T& operator[](unsigned long n)
20 CONSTEXPR void my_swap(T& a, T& b) {
26 CONSTEXPR auto rotate2() {
27 array<array<int, 2>, 2> result{};
28 array<int, 2> a{{0, 1}};
38 CONSTEXPR auto indices = rotate2();
39 assert(indices[0][0] == 0);
40 assert(indices[0][1] == 1);
41 assert(indices[1][0] == 1);
42 assert(indices[1][1] == 0);