_view 
    * 3.1  Parameters 
  * 4  std::ranges::filter_view::  base 
  * 5  std::ranges::filter_view::  pred 
  * 6  std::ranges::filter_view::  begin 
  * 7  std::ranges::filter_view::  end 
    * 7.1  Deduction guides 
    * 7.2  Nested classes 
    * 7.3  Example 
    * 7.4  Defect reports 
    * 7.5  See also 

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

Member name  |  Definition   
---|---  
` _base__ ` (private)  |  The underlying [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") of type ` V ` .   
(  exposition-only member object*  )  
` _pred__ ` (private)  |  Wraps the predicate used to filter out elements of ` _base__ ` of type  [ ` _copyable-box_ ` ](/w/cpp/ranges/copyable_wrapper "cpp/ranges/copyable wrapper") ` <Pred> ` (until C++23)  [ ` _movable-box_ ` ](/w/cpp/ranges/copyable_wrapper "cpp/ranges/copyable wrapper") ` <Pred> ` (since C++23)  augmenting ` Pred ` with assignability when needed and hence always satisfies [ ` copyable ` ](/w/cpp/concepts/copyable "cpp/concepts/copyable") or [ ` movable ` ](/w/cpp/concepts/movable "cpp/concepts/movable") (since C++23)  .   
(  exposition-only member object*  )  
` _begin__ ` (private)  
(optional)  |  An object of [ optional-like ](/w/cpp/ranges#Non-propagating_cache "cpp/ranges") type that caches an iterator to the first element of ` _base__ ` that satisfies the ` _pred__ ` . Present only if ` filter_view ` models [ ` forward_range ` ](/w/cpp/ranges/forward_range "cpp/ranges/forward range") .   
(  exposition-only member object*  )  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/filter_view&action=edit&section=2 "Edit
section: Member functions") ]  Member functions

[ (constructor)  ](/w/cpp/ranges/filter_view#ctor "cpp/ranges/filter view") (C++20)  |  constructs a ` filter_view `   
(public member function)  
---|---  
[ base  ](/w/cpp/ranges/filter_view#base "cpp/ranges/filter view") (C++20)  |  returns the underlying view ` V `   
(public member function)  
[ pred  ](/w/cpp/ranges/filter_view#pred "cpp/ranges/filter view") (C++20)  |  returns a reference to the predicate stored within ` filter_view `   
(public member function)  
[ begin  ](/w/cpp/ranges/filter_view#begin "cpp/ranges/filter view") (C++20)  |  returns the beginning iterator of the ` filter_view `   
(public member function)  
[ end  ](/w/cpp/ranges/filter_view#end "cpp/ranges/filter view") (C++20)  |  returns the sentinel of the ` filter_view `   
(public member function)  
  
#####  Inherited from  [ std::ranges::view_interface
](/w/cpp/ranges/view_interface "cpp/ranges/view interface")  
  
[ empty  ](/w/cpp/ranges/view_interface/empty "cpp/ranges/view interface/empty") (C++20)  |  returns whether the derived view is empty. Provided if it satisfies [ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") or [ ` forward_range ` ](/w/cpp/ranges/forward_range "cpp/ranges/forward range") .   
(public member function of ` std::ranges::view_interface<D> ` )  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_empty&action=edit)  
[ cbegin  ](/w/cpp/ranges/view_interface/cbegin "cpp/ranges/view interface/cbegin") (C++23)  |  returns a constant iterator to the beginning of the range.   
(public member function of ` std::ranges::view_interface<D> ` )  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_cbegin&action=edit)  
[ cend  ](/w/cpp/ranges/view_interface/cend "cpp/ranges/view interface/cend") (C++23)  |  returns a sentinel for the constant iterator of the range.   
(public member function of ` std::ranges::view_interface<D> ` )  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_cend&action=edit)  
[ operator bool  ](/w/cpp/ranges/view_interface/operator_bool "cpp/ranges/view interface/operator bool") (C++20)  |  returns whether the