#pragma once #include #include #include namespace testing { /** * When matching `const TStringBuf&`, implicitly convert other strings and string views to `Eq` matchers. */ template class Matcher&>: public internal::MatcherBase&> { public: Matcher() { } explicit Matcher(const MatcherInterface&>* impl) : internal::MatcherBase&>(impl) { } template ::type::is_gtest_matcher> Matcher(M&& m) : internal::MatcherBase&>(std::forward(m)) { } Matcher(const TBasicString& s) { *this = Eq(TBasicStringBuf(s)); } Matcher(const T* s) { *this = Eq(TBasicStringBuf(s)); } Matcher(TBasicStringBuf s) { *this = Eq(s); } }; /** * When matching `TBasicBuf`, implicitly convert other strings and string views to `Eq` matchers. */ template class Matcher>: public internal::MatcherBase> { public: Matcher() { } explicit Matcher(const MatcherInterface >* impl) : internal::MatcherBase>(impl) { } explicit Matcher(const MatcherInterface&>* impl) : internal::MatcherBase>(impl) { } template ::type::is_gtest_matcher> Matcher(M&& m) : internal::MatcherBase>(std::forward(m)) { } Matcher(const TBasicString& s) { *this = Eq(TBasicString(s)); } Matcher(const T* s) { *this = Eq(TBasicString(s)); } Matcher(TBasicStringBuf s) { *this = Eq(s); } }; /** * When matching `const TString&`, implicitly convert other strings and string views to `Eq` matchers. */ template class Matcher&>: public internal::MatcherBase&> { public: Matcher() { } explicit Matcher(const MatcherInterface&>* impl) : internal::MatcherBase&>(impl) { } Matcher(const TBasicString& s) { *this = Eq(s); } template ::type::is_gtest_matcher> Matcher(M&& m) : internal::MatcherBase&>(std::forward(m)) { } Matcher(const T* s) { *this = Eq(TBasicString(s)); } }; /** * When matching `TString`, implicitly convert other strings and string views to `Eq` matchers. */ template class Matcher>: public internal::MatcherBase> { public: Matcher() { } explicit Matcher(const MatcherInterface >* impl) : internal::MatcherBase>(impl) { } explicit Matcher(const MatcherInterface&>* impl) : internal::MatcherBase>(impl) { } template ::type::is_gtest_matcher> Matcher(M&& m) : internal::MatcherBase>(std::forward(m)) { } Matcher(const TBasicString& s) { *this = Eq(s); } Matcher(const T* s) { *this = Eq(TBasicString(s)); } }; }