Fix documentation bug.

Matchers require the signature of these three functions to be `const`.
This commit is contained in:
Andy Soffer 2024-11-15 10:19:57 -05:00 committed by GitHub
parent d144031940
commit 7927f8e93d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,10 +67,10 @@ namespace testing {
// To implement a matcher Foo for type T, define:
// 1. a class FooMatcherMatcher that implements the matcher interface:
// using is_gtest_matcher = void;
// bool MatchAndExplain(const T&, std::ostream*);
// bool MatchAndExplain(const T&, std::ostream*) const;
// (MatchResultListener* can also be used instead of std::ostream*)
// void DescribeTo(std::ostream*);
// void DescribeNegationTo(std::ostream*);
// void DescribeTo(std::ostream*) const;
// void DescribeNegationTo(std::ostream*) const;
//
// 2. a factory function that creates a Matcher<T> object from a
// FooMatcherMatcher.