Skip to content

Commit 4bbf808

Browse files
Abseil Teamcopybara-github
Abseil Team
authored andcommitted
Add UnpackStructImpl for structs with 20 fields.
PiperOrigin-RevId: 713272335 Change-Id: I2b289ece4ce3f91834a8c9ba11a4bd18e6e40fca
1 parent 7d76a23 commit 4bbf808

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

googlemock/include/gmock/gmock-matchers.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,6 +3291,11 @@ auto UnpackStructImpl(const T& t, std::make_index_sequence<19>, char) {
32913291
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = t;
32923292
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
32933293
}
3294+
template <typename T>
3295+
auto UnpackStructImpl(const T& u, std::make_index_sequence<20>, char) {
3296+
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = u;
3297+
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
3298+
}
32943299
#endif // defined(__cpp_structured_bindings)
32953300

32963301
template <size_t I, typename T>

0 commit comments

Comments
 (0)