diff options
author | Hardik Vala <hardikv@google.com> | 2022-08-22 13:42:26 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-08-22 13:42:57 (GMT) |
commit | 25cc5777a17820a6339204a3552aa1dd5e428669 (patch) | |
tree | 2c664b4206cd46fc774cc2b3d23222f3e476c75c /googlemock/include/gmock/gmock-matchers.h | |
parent | c0e032efe587efa99413dd9ac54c3953a7915588 (diff) | |
download | googletest-25cc5777a17820a6339204a3552aa1dd5e428669.zip googletest-25cc5777a17820a6339204a3552aa1dd5e428669.tar.gz googletest-25cc5777a17820a6339204a3552aa1dd5e428669.tar.bz2 |
Add support of 19-member structs to gmock UnpackStructImpl.
PiperOrigin-RevId: 469171380
Change-Id: Ic75fc0523924e40e620552d4c04b79dad22a68e0
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-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 4615736..5faf8dc 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -3245,6 +3245,11 @@ auto UnpackStructImpl(const T& t, MakeIndexSequence<18>, char) { const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = t; return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r); } +template <typename T> +auto UnpackStructImpl(const T& t, MakeIndexSequence<19>, char) { + const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = t; + return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s); +} #endif // defined(__cpp_structured_bindings) template <size_t I, typename T> |