Skip to content

Commit 2ae29b5

Browse files
Abseil Teamcopybara-github
Abseil Team
authored andcommitted
Add UnpackStructImpl for structs with 22 fields.
PiperOrigin-RevId: 739148442 Change-Id: Iae29066daddeea8384f3eb06ff075299156e9579
1 parent c2ceb2b commit 2ae29b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

googlemock/include/gmock/gmock-matchers.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3407,6 +3407,14 @@ auto UnpackStructImpl(const T& in, std::make_index_sequence<21>, char) {
34073407
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
34083408
u);
34093409
}
3410+
3411+
template <typename T>
3412+
auto UnpackStructImpl(const T& in, std::make_index_sequence<22>, char) {
3413+
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
3414+
v] = in;
3415+
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u,
3416+
v);
3417+
}
34103418
#endif // defined(__cpp_structured_bindings)
34113419

34123420
template <size_t I, typename T>

0 commit comments

Comments
 (0)