/filter_view/iterator#base
"cpp/ranges/filter view/iterator")  
[ filter_view:: _iterator_ ::operator*  filter_view:: _iterator_ ::operator->
](/w/cpp/ranges/filter_view/iterator#dereference "cpp/ranges/filter
view/iterator")  
[ filter_view:: _iterator_ ::operator++  
filter_view:: _iterator_ ::operator++  (int)
](/w/cpp/ranges/filter_view/iterator#increment "cpp/ranges/filter
view/iterator")  
[ filter_view:: _iterator_ ::operator--  
filter_view:: _iterator_ ::operator--  (int)
](/w/cpp/ranges/filter_view/iterator#decrement "cpp/ranges/filter
view/iterator")  
[ operator==  (filter_view:: _iterator_ )
](/w/cpp/ranges/filter_view/iterator#compare "cpp/ranges/filter
view/iterator")  
[ iter_move  (filter_view:: _iterator_ )
](/w/cpp/ranges/filter_view/iterator#move "cpp/ranges/filter view/iterator")  
[ iter_swap  (filter_view:: _iterator_ )
](/w/cpp/ranges/filter_view/iterator#swap "cpp/ranges/filter view/iterator")  
[ Sentinel ](/w/cpp/ranges/filter_view/sentinel "cpp/ranges/filter
view/sentinel")  
[ filter_view:: _sentinel_ :: _sentinel_
](/w/cpp/ranges/filter_view/sentinel#ctor "cpp/ranges/filter view/sentinel")  
[ filter_view:: _sentinel_ ::base  ](/w/cpp/ranges/filter_view/sentinel#base
"cpp/ranges/filter view/sentinel")  
[ operator==  (filter_view:: _iterator_ , filter_view:: _sentinel_ )
](/w/cpp/ranges/filter_view/sentinel#compare "cpp/ranges/filter
view/sentinel")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/filter_view/navbar_content&action=edit)

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
template  < [ ranges::  input_range
](http://en.cppreference.com/w/cpp/ranges/input_range) V,  
[ std::  indirect_unary_predicate
](http://en.cppreference.com/w/cpp/iterator/indirect_unary_predicate) < [
ranges::  iterator_t  ](http://en.cppreference.com/w/cpp/ranges-ranges-
placeholder/iterator_t) < V  >> Pred  >  
requires [ ranges::  view  ](http://en.cppreference.com/w/cpp/ranges/view) < V
> && [ std::  is_object_v  ](http://en.cppreference.com/w/cpp/types/is_object)
< Pred  >  
class  filter_view  
:  public  [ ranges::  view_interface  ](http://en.cppreference.com/w/cpp/ranges/view_interface) < filter_view  < V, Pred  >> |  (1)  |  (since C++20)   
namespace  views  {  
inline  constexpr  /* unspecified */  filter  =  /* 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  filter  (  R  && r, Pred  && pred  )  ;  |  |  (since C++20)   
template  < class  Pred  >  
constexpr  /* range adaptor closure */  filter  (  Pred  && pred  )  ;  |  |  (since C++20)   
|  |   
  
1)  A range adaptor that represents [ ` view ` ](/w/cpp/ranges/view
"cpp/ranges/view") of an underlying sequence without the elements that fail to
satisfy a predicate.

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

` filter_view ` models the concepts [ ` 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 ` ](/w/cpp/ranges/view "cpp/ranges/view") ` V ` models
respective concepts.

##  Contents

  * 1  Data members 
  * 2  Member functions 
    * 2.1  Inherited from  std::ranges::view_interface 
  * 3  std::ranges::filter_view::  filter