Googletest export
Allow copying of the string in MatchAndExplain. Otherwise, conversions from std::string_view to std::string will fail as being explicit PiperOrigin-RevId: 290301103
This commit is contained in:
		
				
					committed by
					
						
						Xiaoyi Zhang
					
				
			
			
				
	
			
			
			
						parent
						
							9417fb401a
						
					
				
				
					commit
					d01e356e15
				
			@@ -678,7 +678,7 @@ class StrEqualityMatcher {
 | 
				
			|||||||
  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);
 | 
					    const StringType s2(s);
 | 
				
			||||||
    const bool eq = case_sensitive_ ? s2 == string_ :
 | 
					    const bool eq = case_sensitive_ ? s2 == string_ :
 | 
				
			||||||
        CaseInsensitiveStringEquals(s2, string_);
 | 
					        CaseInsensitiveStringEquals(s2, string_);
 | 
				
			||||||
    return expect_eq_ == eq;
 | 
					    return expect_eq_ == eq;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user