MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / CountIf

Function CountIf

rtpose_wrapper/src/gtest/gtest-all.cpp:670–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 9

HasFatalFailureMethod · 0.85
HasNonfatalFailureMethod · 0.85
successful_test_countMethod · 0.85
failed_test_countMethod · 0.85
disabled_test_countMethod · 0.85
test_to_run_countMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected