possible fix

This commit is contained in:
o-micron 2020-03-09 21:01:14 +02:00
parent ae5e0a101b
commit 5a5f3c116d
2 changed files with 9 additions and 1 deletions

View File

@ -432,6 +432,14 @@ class GTEST_API_ Matcher<internal::StringView>
#endif // GTEST_INTERNAL_HAS_STRING_VIEW
// Prints a matcher in a human-readable format.
#if GTEST_INTERNAL_HAS_STRING_VIEW
template <typename T = internal::StringView>
std::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {
matcher.DescribeTo(&os);
return os;
}
#endif // GTEST_INTERNAL_HAS_STRING_VIEW
template <typename T>
std::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {
matcher.DescribeTo(&os);

View File

@ -2223,7 +2223,7 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
#endif // !defined(GTEST_INTERNAL_DEPRECATED)
#if GTEST_HAS_ABSL && __cplusplus >= 201703L // double check for c++17 support ?
#if GTEST_HAS_ABSL
// Always use absl::string_view for Matcher<> specializations if googletest
// is built with absl support.
# define GTEST_INTERNAL_HAS_STRING_VIEW 1