Features cannot be used for many of the STL range operations (see #11). Using tests such as std::any_of either requires explicit iteration (more verbose) or creating a std::vector containing the features (memory-allocation overhead).
Instead, these operations could be implemented as scalar query functions directly in Features:
any(<Predicate>)
all(<Predicate>)
none(<Predicate>)
count(<Predicate>)
first(<Predicate>)
one(<Predicate>)
In addition, Features could support forEach (also with the possibility to process features in parallel).
Review
- Naming consistency with toolkits for Java and Python