86[[nodiscard]]
constexpr auto fields(
auto&& aggregate)
noexcept {
87 using T = std::remove_cvref_t<
decltype(aggregate)>;
88 static_assert(std::is_aggregate_v<T>);
89 constexpr std::size_t FIELD_COUNT = aggregate_size_v<T>;
90 if constexpr (FIELD_COUNT == 26) {
91 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z] = aggregate;
92 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z);
93 }
else if constexpr (FIELD_COUNT == 25) {
94 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y] = aggregate;
95 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y);
96 }
else if constexpr (FIELD_COUNT == 24) {
97 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x] = aggregate;
98 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x);
99 }
else if constexpr (FIELD_COUNT == 23) {
100 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w] = aggregate;
101 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w);
102 }
else if constexpr (FIELD_COUNT == 22) {
103 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v] = aggregate;
104 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v);
105 }
else if constexpr (FIELD_COUNT == 21) {
106 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u] = aggregate;
107 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u);
108 }
else if constexpr (FIELD_COUNT == 20) {
109 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = aggregate;
110 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
111 }
else if constexpr (FIELD_COUNT == 19) {
112 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = aggregate;
113 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
114 }
else if constexpr (FIELD_COUNT == 18) {
115 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = aggregate;
116 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
117 }
else if constexpr (FIELD_COUNT == 17) {
118 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = aggregate;
119 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q);
120 }
else if constexpr (FIELD_COUNT == 16) {
121 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p] = aggregate;
122 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
123 }
else if constexpr (FIELD_COUNT == 15) {
124 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o] = aggregate;
125 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
126 }
else if constexpr (FIELD_COUNT == 14) {
127 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m, n] = aggregate;
128 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
129 }
else if constexpr (FIELD_COUNT == 13) {
130 auto&& [a, b, c, d, e, f, g, h, i, j, k, l, m] = aggregate;
131 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m);
132 }
else if constexpr (FIELD_COUNT == 12) {
133 auto&& [a, b, c, d, e, f, g, h, i, j, k, l] = aggregate;
134 return std::tie(a, b, c, d, e, f, g, h, i, j, k, l);
135 }
else if constexpr (FIELD_COUNT == 11) {
136 auto&& [a, b, c, d, e, f, g, h, i, j, k] = aggregate;
137 return std::tie(a, b, c, d, e, f, g, h, i, j, k);
138 }
else if constexpr (FIELD_COUNT == 10) {
139 auto&& [a, b, c, d, e, f, g, h, i, j] = aggregate;
140 return std::tie(a, b, c, d, e, f, g, h, i, j);
141 }
else if constexpr (FIELD_COUNT == 9) {
142 auto&& [a, b, c, d, e, f, g, h, i] = aggregate;
143 return std::tie(a, b, c, d, e, f, g, h, i);
144 }
else if constexpr (FIELD_COUNT == 8) {
145 auto&& [a, b, c, d, e, f, g, h] = aggregate;
146 return std::tie(a, b, c, d, e, f, g, h);
147 }
else if constexpr (FIELD_COUNT == 7) {
148 auto&& [a, b, c, d, e, f, g] = aggregate;
149 return std::tie(a, b, c, d, e, f, g);
150 }
else if constexpr (FIELD_COUNT == 6) {
151 auto&& [a, b, c, d, e, f] = aggregate;
152 return std::tie(a, b, c, d, e, f);
153 }
else if constexpr (FIELD_COUNT == 5) {
154 auto&& [a, b, c, d, e] = aggregate;
155 return std::tie(a, b, c, d, e);
156 }
else if constexpr (FIELD_COUNT == 4) {
157 auto&& [a, b, c, d] = aggregate;
158 return std::tie(a, b, c, d);
159 }
else if constexpr (FIELD_COUNT == 3) {
160 auto&& [a, b, c] = aggregate;
161 return std::tie(a, b, c);
162 }
else if constexpr (FIELD_COUNT == 2) {
163 auto&& [a, b] = aggregate;
164 return std::tie(a, b);
165 }
else if constexpr (FIELD_COUNT == 1) {
166 auto&& [a] = aggregate;