mirror of
https://github.com/google/googletest.git
synced 2025-01-12 23:47:00 +08:00
Add UnpackStructImpl for structs with 20 fields.
PiperOrigin-RevId: 713272335 Change-Id: I2b289ece4ce3f91834a8c9ba11a4bd18e6e40fca
This commit is contained in:
parent
7d76a231b0
commit
4bbf80823c
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user