Add support of 17-member structs to gmock UnpackStructImpl.

PiperOrigin-RevId: 458018249
Change-Id: I7df8f75ef5b5a6478e7301f959c221810ff9f0b3
This commit is contained in:
Abseil Team 2022-06-29 11:10:19 -07:00 committed by Copybara-Service
parent 9406a60c78
commit d9335595b4

View File

@ -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>