drop_while_view/navbar_content&action=edit)

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
template  < [ ranges::  view  ](http://en.cppreference.com/w/cpp/ranges/view)
V,  class  Pred  >  
requires [ ranges::  input_range
](http://en.cppreference.com/w/cpp/ranges/input_range) < V  > &&  
[ std::  is_object_v  ](http://en.cppreference.com/w/cpp/types/is_object) <
Pred  > &&  
[ std::  indirect_unary_predicate
](http://en.cppreference.com/w/cpp/iterator/indirect_unary_predicate) < const
Pred, [ ranges::  iterator_t  ](http://en.cppreference.com/w/cpp/ranges-
ranges-placeholder/iterator_t) < V  >>  
class  drop_while_view  
:  public  [ ranges::  view_interface  ](http://en.cppreference.com/w/cpp/ranges/view_interface) < drop_while_view  < V, Pred  >> |  (1)  |  (since C++20)   
namespace  views  {  
inline  constexpr  /* unspecified */  drop_while  =  /* unspecified */  ;  
}  |  (2)  |  (since C++20)   
Call signature  |  |   
template  < [ ranges::  viewable_range
](http://en.cppreference.com/w/cpp/ranges/viewable_range) R,  class  Pred  >  
requires  /* see below */  
constexpr  [ ranges::  view  ](http://en.cppreference.com/w/cpp/ranges/view) auto  drop_while  (  R  && r, Pred  && pred  )  ;  |  |  (since C++20)   
template  < class  Pred  >  
constexpr  /*range adaptor closure*/  drop_while  (  Pred  && pred  )  ;  |  |  (since C++20)   
|  |   
  
1)  A range adaptor that represents [ ` view ` ](/w/cpp/ranges/view
"cpp/ranges/view") of elements from an underlying sequence, beginning at the
first element for which the predicate returns  false  .

2)  [ RangeAdaptorObject  ](/w/cpp/named_req/RangeAdaptorObject "cpp/named
req/RangeAdaptorObject") . The expression  views  ::  drop_while  (  e, f  )
is [ expression-equivalent ](/w/cpp/language/expressions#Expression-
equivalence "cpp/language/expressions") to  drop_while_view  (  e, f  )  for
any suitable subexpressions  e  and  f  .

drop_while_view  models the concepts [ ` contiguous_range `
](/w/cpp/ranges/contiguous_range "cpp/ranges/contiguous range") , [ `
random_access_range ` ](/w/cpp/ranges/random_access_range "cpp/ranges/random
access range") , [ ` bidirectional_range ` ](/w/cpp/ranges/bidirectional_range
"cpp/ranges/bidirectional range") , [ ` forward_range `
](/w/cpp/ranges/forward_range "cpp/ranges/forward range") , [ ` input_range `
](/w/cpp/ranges/input_range "cpp/ranges/input range") , and [ ` common_range `
](/w/cpp/ranges/common_range "cpp/ranges/common range") when the underlying
view  V  models respective concepts. It also models [ ` sized_range `
](/w/cpp/ranges/sized_range "cpp/ranges/sized range") if  [ ranges::
forward_range  ](http://en.cppreference.com/w/cpp/ranges/forward_range) < V  >
and  [ std::  sized_sentinel_for
](http://en.cppreference.com/w/cpp/iterator/sized_sentinel_for) < [ ranges::
sentinel_t  ](http://en.cppreference.com/w/cpp/ranges-ranges-
placeholder/iterator_t) < V  > , [ ranges::  iterator_t
](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/iterator_t) < V
>> are modeled.

##  Contents

  * 1  Member functions 
    * 1.1  Inherited from  std::ranges::view_interface 
  * 2  Deduction guides 
  * 3  Helper templates 
  * 4  Notes 
  * 5  Example 
  * 6  Defect reports 
  * 7  See also 

  
---  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/drop_while_view&action=edit&section=1
"Edit section: Member functions") ]  Member functions

[ (constructor)  ](/w/cpp/ranges/drop_while_view/drop_while_view "cpp/ranges/drop while view/drop while view") (C++20)  |  constructs a ` drop_while_view `   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_constructor&action=edit)  
---|---  
[ base  ](/w/cpp/ranges/drop_while_view/base "cpp/ranges/drop while view/base") (C++20)  |  returns a copy of the underlying (adapted) view   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?titl