MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / count

Function count

unittests/catch.hpp:2525–2533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2523 namespace Detail {
2524 template <typename InputIterator, typename T>
2525 size_t count(InputIterator first, InputIterator last, T const& item) {
2526 size_t cnt = 0;
2527 for (; first != last; ++first) {
2528 if (*first == item) {
2529 ++cnt;
2530 }
2531 }
2532 return cnt;
2533 }
2534 template <typename InputIterator, typename T>
2535 bool contains(InputIterator first, InputIterator last, T const& item) {
2536 for (; first != last; ++first) {

Callers 3

matchMethod · 0.70
Object_Lifetime_TestMethod · 0.70
~Object_Lifetime_TestMethod · 0.70

Calls

no outgoing calls

Tested by 2

Object_Lifetime_TestMethod · 0.56
~Object_Lifetime_TestMethod · 0.56