ΒΆtemplate <typename IterTy>
bool hasNItems(
    IterTy&& Begin,
    IterTy&& End,
    unsigned int N,
    typename std::enable_if<
        !std::is_same<
            typename std::iterator_traits<
                typename std::remove_reference<
                    decltype(Begin)>::type>::
                iterator_category,
            std::random_access_iterator_tag>::
            value,
        void>::type* = nullptr)

Description

Return true if the sequence [Begin, End) has exactly N items. Runs in O(N) time. Not meant for use with random-access iterators.

Declared at: llvm/include/llvm/ADT/STLExtras.h:1543

Templates

IterTy

Parameters

IterTy&& Begin
IterTy&& End
unsigned int N
typename std::enable_if< !std::is_same< typename std::iterator_traits< typename std::remove_reference< decltype(Begin)>::type>:: iterator_category, std::random_access_iterator_tag>::value, void>::type* = nullptr