From 77f6bd3e75a2e7d3c67a024893417de42f58c418 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 12 Feb 2026 06:24:38 -0800 Subject: [PATCH] Update comment for SizeIs matcher. Clarify that SizeIs only requires the container to have a size() method, and the argument type can be any type compatible with the return type of size(). The previous comment incorrectly mentioned a requirement for size_type. PiperOrigin-RevId: 869184176 Change-Id: Ib2d867fbfecde0006734772cf07958871a171199 --- googlemock/include/gmock/gmock-matchers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 60ddeabc..55243b72 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -4984,9 +4984,9 @@ inline PolymorphicMatcher> Truly( } // Returns a matcher that matches the container size. The container must -// support both size() and size_type which all STL-like containers provide. -// Note that the parameter 'size' can be a value of type size_type as well as -// matcher. For instance: +// support size() which all STL-like containers provide. +// Note that the parameter 'size' can be a value of type returned by size() as +// well as a matcher. For instance: // EXPECT_THAT(container, SizeIs(2)); // Checks container has 2 elements. // EXPECT_THAT(container, SizeIs(Le(2)); // Checks container has at most 2. template