[range.drop.overview] (original) (raw)

25 Ranges library [ranges]

25.7 Range adaptors [range.adaptors]

25.7.12 Drop view [range.drop]

25.7.12.1 Overview [range.drop.overview]

drop_view produces a view excluding the first N elements from another view, or an empty range if the adapted view contains fewer than N elements.

Let E and F be expressions, let T be remove_cvref_t<decltype((E))>, and let D be range_difference_t<decltype((E))>.

If decltype((F)) does not modelconvertible_to<D>,views​::​drop(E, F) is ill-formed.

Otherwise, the expression views​::​drop(E, F)is expression-equivalent to:

[Example 1: auto ints = views::iota(0) | views::take(10);for (auto i : ints | views::drop(5)) { cout << i << ' '; } — _end example_]