Add UnpackStructImpl for structs with 20 fields.

PiperOrigin-RevId: 713272335
Change-Id: I2b289ece4ce3f91834a8c9ba11a4bd18e6e40fca
This commit is contained in:
Abseil Team 2025-01-08 06:37:41 -08:00 committed by Copybara-Service
parent 7d76a231b0
commit 4bbf80823c

View File

@ -3291,6 +3291,11 @@ auto UnpackStructImpl(const T& t, std::make_index_sequence<19>, char) {
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = t;
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
}
template <typename T>
auto UnpackStructImpl(const T& u, std::make_index_sequence<20>, char) {
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = u;
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
}
#endif // defined(__cpp_structured_bindings)
template <size_t I, typename T>