MCPcopy Create free account
hub / github.com/boostorg/parser / foreach_subrange_of

Function foreach_subrange_of

include/boost/parser/detail/text/algorithm.hpp:210–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 `x`. Subranges passed to `f` are non-overlapping. */
209 template<typename FwdIter, typename Sentinel, typename T, typename Func>
210 Func foreach_subrange_of(FwdIter first, Sentinel last, T const & x, Func f)
211 {
212 while (first != last) {
213 first = boost::parser::detail::text::find(first, last, x);
214 auto const next = boost::parser::detail::text::find_not(first, last, x);
215 if (first != next) {
216 f(boost::parser::detail::text::foreach_subrange_range<FwdIter, Sentinel>(
217 first, next));
218 }
219 first = next;
220 }
221 return f;
222 }
223
224 /** Calls `f(sub)` for each subrange `sub` in `[first, last)`. A subrange
225 is a contiguous subsequence of elements `ei` for which `p(ei)` is

Callers

nothing calls this directly

Calls 2

findFunction · 0.85
find_notFunction · 0.85

Tested by

no test coverage detected