MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / CountIf

Function CountIf

tests/gtest/gtest-all.cc:672–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670// the given predicate.
671template <class Container, typename Predicate>
672inline int CountIf(const Container& c, Predicate predicate) {
673 // Implemented as an explicit loop since std::count_if() in libCstd on
674 // Solaris has a non-standard signature.
675 int count = 0;
676 for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
677 if (predicate(*it))
678 ++count;
679 }
680 return count;
681}
682
683// Applies a function/functor to each element in the container.
684template <class Container, typename Functor>

Callers 13

SkippedMethod · 0.85
HasFatalFailureMethod · 0.85
HasNonfatalFailureMethod · 0.85
successful_test_countMethod · 0.85
skipped_test_countMethod · 0.85
failed_test_countMethod · 0.85
disabled_test_countMethod · 0.85
reportable_test_countMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected