From d9335595b4cd73c8450c18e4dbf1ee0801c23c2e Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 29 Jun 2022 11:10:19 -0700 Subject: Add support of 17-member structs to gmock UnpackStructImpl. PiperOrigin-RevId: 458018249 Change-Id: I7df8f75ef5b5a6478e7301f959c221810ff9f0b3 --- googlemock/include/gmock/gmock-matchers.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 6282901..3c8cc32 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -3235,6 +3235,11 @@ auto UnpackStructImpl(const T& t, MakeIndexSequence<16>, char) { const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p] = t; return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); } +template +auto UnpackStructImpl(const T& t, MakeIndexSequence<17>, char) { + const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = t; + return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q); +} #endif // defined(__cpp_structured_bindings) template -- cgit v0.12