[range.drop.while.overview]

# 25 Ranges library [[ranges]](./#ranges)

## 25.7 Range adaptors [[range.adaptors]](range.adaptors#range.drop.while.overview)

### 25.7.13 Drop while view [[range.drop.while]](range.drop.while#overview)

#### 25.7.13.1 Overview [range.drop.while.overview]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L6536)

Given a unary predicate pred and a view r,drop_while_view produces a view
of the range [ranges​::​find_if_not(r, pred), ranges​::​end(r))[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L6541)

The name views​::​drop_while denotes a range adaptor object ([[range.adaptor.object]](range.adaptor.object "25.7.2 Range adaptor objects"))[.](#2.sentence-1)

Given subexpressions E and F,
the expression views​::​drop_while(E, F) is expression-equivalent to drop_while_view(E, F)[.](#2.sentence-2)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L6549)

[*Example [1](#example-1)*: constexpr auto source = " \t \t \t hello there"sv;auto is_invisible = [](const auto x) { return x == ' ' || x == '\t'; };auto skip_ws = views::drop_while(source, is_invisible);for (auto c : skip_ws) { cout << c; // prints hello there with no leading space} â *end example*]
