PicoBlog

Daily bit(e) of C++ | std::count, std::count_if

The std::count and std::count_if are linear search (counting) algorithms that return the number of elements matching either a provided value or a provided predicate.

Both variants support a parallel version through std::execution.

Leave a comment

ncG1vNJzZmirmaK8r8DOrZ9nq6WXwLWtwqRlnKedZL1wsMCio7Jlkp7BpnnOn2ScZaOpsaS71KerZqukmbCwwc2tlqKe

Lynna Burgamy

Update: 2024-12-03