diff options
author | Abseil Team <absl-team@google.com> | 2022-06-29 18:10:19 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-29 18:10:54 (GMT) |
commit | d9335595b4cd73c8450c18e4dbf1ee0801c23c2e (patch) | |
tree | 2e921b54dc4fee5f7c9a22e9314b8f9c280991db /googlemock/include/gmock | |
parent | 9406a60c7839052e4944ea4dbc8344762a89f9bd (diff) | |
download | googletest-d9335595b4cd73c8450c18e4dbf1ee0801c23c2e.zip googletest-d9335595b4cd73c8450c18e4dbf1ee0801c23c2e.tar.gz googletest-d9335595b4cd73c8450c18e4dbf1ee0801c23c2e.tar.bz2 |
Add support of 17-member structs to gmock UnpackStructImpl.
PiperOrigin-RevId: 458018249
Change-Id: I7df8f75ef5b5a6478e7301f959c221810ff9f0b3
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <typename T> +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 <size_t I, typename T> |