count_if-snippet.h 136 Bytes Edit 1 2 3 using embb::algorithms::CountIf; count = CountIf(range, range + 8, [](const int& value) -> bool { return value > 0; });