From 7927f8e93d2cc7788229ab446179fdfda15e75e4 Mon Sep 17 00:00:00 2001 From: Andy Soffer Date: Fri, 15 Nov 2024 10:19:57 -0500 Subject: [PATCH] Fix documentation bug. Matchers require the signature of these three functions to be `const`. --- googletest/include/gtest/gtest-matchers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h index eae210e9..78160f0e 100644 --- a/googletest/include/gtest/gtest-matchers.h +++ b/googletest/include/gtest/gtest-matchers.h @@ -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 object from a // FooMatcherMatcher.