Googletest export
Tolerate std::string's explicit copy construction from std::string_view. PiperOrigin-RevId: 277583394
This commit is contained in:
		@@ -758,8 +758,7 @@ class HasSubstrMatcher {
 | 
			
		||||
  template <typename MatcheeStringType>
 | 
			
		||||
  bool MatchAndExplain(const MatcheeStringType& s,
 | 
			
		||||
                       MatchResultListener* /* listener */) const {
 | 
			
		||||
    const StringType& s2(s);
 | 
			
		||||
    return s2.find(substring_) != StringType::npos;
 | 
			
		||||
    return StringType(s).find(substring_) != StringType::npos;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Describes what this matcher matches.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user