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:
Abseil Team 2020-01-17 13:53:01 -05:00 committed by Xiaoyi Zhang
parent 9417fb401a
commit d01e356e15

View File

@ -678,7 +678,7 @@ class StrEqualityMatcher {
template <typename MatcheeStringType>
bool MatchAndExplain(const MatcheeStringType& s,
MatchResultListener* /* listener */) const {
const StringType& s2(s);
const StringType s2(s);
const bool eq = case_sensitive_ ? s2 == string_ :
CaseInsensitiveStringEquals(s2, string_);
return expect_eq_ == eq;