Commit e2fc3a9c by Abseil Team Committed by vslashg

Googletest export

Tolerate std::string's explicit copy construction from std::string_view. PiperOrigin-RevId: 277583394
parent 0a034808
...@@ -758,8 +758,7 @@ class HasSubstrMatcher { ...@@ -758,8 +758,7 @@ class HasSubstrMatcher {
template <typename MatcheeStringType> template <typename MatcheeStringType>
bool MatchAndExplain(const MatcheeStringType& s, bool MatchAndExplain(const MatcheeStringType& s,
MatchResultListener* /* listener */) const { MatchResultListener* /* listener */) const {
const StringType& s2(s); return StringType(s).find(substring_) != StringType::npos;
return s2.find(substring_) != StringType::npos;
} }
// Describes what this matcher matches. // Describes what this matcher matches.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment