Skip to content

Commit 144d335

Browse files
Abseil Teamcopybara-github
authored andcommitted
Add UnpackStructImpl for structs with 21 fields.
PiperOrigin-RevId: 731737844 Change-Id: I3efeb26b0bf179958c8a3eda0b55dfc3d7778fb9
1 parent e5669fd commit 144d335

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

googlemock/include/gmock/gmock-matchers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,6 +3305,13 @@ auto UnpackStructImpl(const T& u, std::make_index_sequence<20>, char) {
33053305
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t] = u;
33063306
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t);
33073307
}
3308+
template <typename T>
3309+
auto UnpackStructImpl(const T& in, std::make_index_sequence<21>, char) {
3310+
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u] =
3311+
in;
3312+
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
3313+
u);
3314+
}
33083315
#endif // defined(__cpp_structured_bindings)
33093316

33103317
template <size_t I, typename T>

0 commit comments

Comments
 (0)