Merge pull request #3195 from Inujel:fix-3194

PiperOrigin-RevId: 398271948
This commit is contained in:
dinord
2021-09-23 23:31:42 +00:00
2 changed files with 8 additions and 11 deletions

View File

@@ -273,7 +273,7 @@ inline int CountIf(const Container& c, Predicate predicate) {
// Implemented as an explicit loop since std::count_if() in libCstd on
// Solaris has a non-standard signature.
int count = 0;
for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
for (auto it = c.begin(); it != c.end(); ++it) {
if (predicate(*it))
++count;
}