[#llvm-hasNItemsOrMore-0d] = xref:llvm.adoc[llvm]::hasNItemsOrMore :relfileprefix: ../ :mrdocs: Return true if []`Begin,` `End)` contains at least `N` counted items. == Synopsis Declared in `<llvm/ADT/STLExtras.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename IterTy, typename Pred = bool(*)( constdecltype(*std::declval<IterTy>())&)> bool hasNItemsOrMore( IterTy&& Begin, IterTy&& End, unsigned int N, Pred&& ShouldBeCounted = [](const decltype(*std::declval<IterTy>()) &) { return true; }) requires !std::is_base_of<std::random_access_iterator_tag, typename std::iterator_traits<std::remove_reference_t< decltype(Begin)>>::iterator_category>::value; ---- == Description Runs in O(N) time. Not meant for use with random‐access iterators. Can optionally take a predicate to lazily filter some items. == Return Value True if the range contains at least `N` counted items. == Parameters [cols="1,4"] |=== | Name| Description | *Begin* | Iterator to the first element. | *End* | Iterator past the last element. | *N* | Minimum number of counted items required. | *ShouldBeCounted* | Predicate selecting which items count toward `N.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#