14 template<concepts::Predicate<c32> Pred>
15 class MatchExactly :
public ParserBase<MatchExactly<Pred>> {
18 constexpr explicit MatchExactly(InPlace, P&& predicate,
usize count)
19 : m_predicate(util::forward<P>(predicate)), m_count(
count) {}
21 template<concepts::ParserContext Context>
27 auto remaining = m_count;
29 while (it != sent && m_predicate(*it) && remaining > 0) {
47 struct MatchExactlyFunction {
48 template<concepts::Predicate<c32> Pred>
49 requires(concepts::DecayConstructible<Pred>)
50 constexpr auto operator()(Pred&& predicate,
usize count)
const {
51 return MatchExactly<meta::Decay<Pred>> {
in_place, util::forward<Pred>(predicate),
count };
constexpr auto reconstruct
Definition reconstruct.h:75
constexpr auto end
Definition end.h:55
constexpr auto begin
Definition begin.h:52
constexpr auto start
Definition start.h:20
Definition code_point_parser.h:10
constexpr auto match_exactly
Definition match_exactly.h:56
constexpr auto parse
Definition parse.h:23
size_t usize
Definition integers.h:33
Unexpected(E &&) -> Unexpected< meta::UnwrapRefDecay< E > >
constexpr auto in_place_type
Definition in_place_type.h:12
constexpr auto in_place
Definition in_place.h:8
constexpr auto count
Definition count.h:37