coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Counts elements in a sequence. More...
Functions | |
template<typename = void> | |
auto | coveo::linq::count () -> detail::count_impl_0<> |
Counts elements in sequence. More... | |
template<typename Pred > | |
auto | coveo::linq::count (const Pred &pred) -> detail::count_impl_1< Pred > |
Counts elements in sequence satisfying a predicate. More... | |
The count
operator computes the number of elements in a sequence, or the number of elements satisfying a given predicate.
This is a terminal operator.
.NET equivalent: Count
auto coveo::linq::count | ( | ) | -> detail::count_impl_0<> |
auto coveo::linq::count | ( | const Pred & | pred | ) | -> detail::count_impl_1<Pred> |
Computes the number of elements in a sequence that satisfy the given predicate.
Use like this:
pred | Predicate to satisfy. |
pred
has returned true
.