diff options
author | dmauro <dmauro@google.com> | 2020-10-14 14:37:22 (GMT) |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2020-10-14 22:26:32 (GMT) |
commit | 79dc0f231a5fc191c90910615572c737c9d688ee (patch) | |
tree | 827ac63422d5651a526b63d93ddd93ba572c0d8a /googletest/include/gtest/internal | |
parent | b2cb220eb79270e7139919df6be1d7401be32b0e (diff) | |
download | googletest-79dc0f231a5fc191c90910615572c737c9d688ee.zip googletest-79dc0f231a5fc191c90910615572c737c9d688ee.tar.gz googletest-79dc0f231a5fc191c90910615572c737c9d688ee.tar.bz2 |
Googletest export
Disable -Wmismatched-tags warning for struct/class tuple_size
PiperOrigin-RevId: 337087493
Diffstat (limited to 'googletest/include/gtest/internal')
-rw-r--r-- | googletest/include/gtest/internal/gtest-internal.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 738e6c3..959f6fc 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -1323,11 +1323,19 @@ constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; } } // namespace testing namespace std { - +// Some standard library implementations use `struct tuple_size` and some use +// `class tuple_size`. Clang warns about the mismatch. +// https://reviews.llvm.org/D55466 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmismatched-tags" +#endif template <typename... Ts> -class tuple_size<testing::internal::FlatTuple<Ts...>> - : public std::integral_constant<size_t, sizeof...(Ts)> {}; - +struct tuple_size<testing::internal::FlatTuple<Ts...>> + : std::integral_constant<size_t, sizeof...(Ts)> {}; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } // namespace std #define GTEST_MESSAGE_AT_(file, line, message, result_type) \ |