hasNItems overloads
Declared in <llvm/ADT/STLExtras.h>
Return true if container C has exactly N items.
template<typename ContainerTy>
bool
hasNItems(
ContainerTy&& C,
unsigned int N);
» more...
Return true if []Begin, End) contains exactly N counted items.
template<
typename IterTy,
typename Pred = bool(*)( constdecltype(*std::declval<IterTy>())&)>
bool
hasNItems(
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;
» more...
Return true if []Begin, End) contains exactly N counted items.
template<
typename IterTy,
typename Pred = bool(*)( constdecltype(*std::declval<IterTy>())&)>
bool
hasNItems(
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;
» more...
C has exactly N items.N counted items.| Name | Description |
|---|---|
| C | Container to inspect. |
| N | Exact number of items required. |
| Begin | Iterator to the first element. |
| End | Iterator past the last element. |
| ShouldBeCounted | Predicate selecting which items count toward N. |