mrdocs::contains_n

Determine if a range contains at least N instances of the specified element.

Synopsis

Declared in <mrdocs/Support/Algorithm.hpp>

template<
    std::ranges::range Range,
    class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_n(
    Range const& range,
    El const& el,
    std::size_t n);

Return Value

True if the element is found, false otherwise.

Parameters

Name

Description

range

The range to search.

el

The element to search for.

n

The number of instances to search for.

Created with MrDocs