constexpr ranges::subrange<ranges::iterator_t<V>>
  find_next( ranges::iterator_t<V> it );           // exposition only
(since C++20)

Searches for the next occurrence of pattern in the underlying view. This function is for exposition only and its name is not normative.

Equivalent to:

auto [b, e] = ranges::search(ranges::subrange(it, ranges::end(base_)), pattern_);
if (b != ranges::end(base_) && ranges::empty(pattern_)) {
return {b, e};


it - an iterator to the position at which to start the search

Return value

A subrange that represents the next position of the pattern, if it was found. An empty subrange otherwise.

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.