diff --git a/test/gtest/gtest/gtest.h b/test/gtest/gtest/gtest.h index a3c845334934..55a31d0a87dc 100644 --- a/test/gtest/gtest/gtest.h +++ b/test/gtest/gtest/gtest.h @@ -6336,6 +6336,14 @@ struct SharedPayload : SharedPayloadBase { T value; }; +template +using is_trivially_copy_constructible = +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5 + std::has_trivial_copy_constructor; +#else + std::is_trivially_copy_constructible; +#endif + // An internal class for implementing Matcher, which will derive // from it. We put functionalities common to all Matcher // specializations here to avoid code duplication. @@ -6509,7 +6517,7 @@ class MatcherBase : private MatcherDescriberInterface { template static constexpr bool IsInlined() { return sizeof(M) <= sizeof(Buffer) && alignof(M) <= alignof(Buffer) && - std::is_pod::value && + is_trivially_copy_constructible::value && std::is_trivially_destructible::value; }