ator#assign "cpp/ranges/basic istream
view/iterator")  
[ basic_istream_view:: _iterator_ ::operator++
](/w/cpp/ranges/basic_istream_view/iterator#increment "cpp/ranges/basic
istream view/iterator")  
[ basic_istream_view:: _iterator_ ::operator*
](/w/cpp/ranges/basic_istream_view/iterator#dereference "cpp/ranges/basic
istream view/iterator")  
[ operator==  (basic_istream_view:: _iterator_ )
](/w/cpp/ranges/basic_istream_view/iterator#Non-member_functions
"cpp/ranges/basic istream view/iterator")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/basic_istream_view/navbar_content&action=edit)

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
template  < [ std::  movable
](http://en.cppreference.com/w/cpp/concepts/movable) Val,  class  CharT,
class  Traits  =  [ std::  char_traits
](http://en.cppreference.com/w/cpp/string/char_traits) < CharT  > >  
requires [ std::  default_initializable
](http://en.cppreference.com/w/cpp/concepts/default_initializable) < Val  > &&  
/*stream-extractable*/  < Val,CharT,Traits  >  
class  basic_istream_view  
:  public  [ ranges::  view_interface  ](http://en.cppreference.com/w/cpp/ranges/view_interface) < basic_istream_view  < Val,CharT,Traits  >> |  (1)  |  (since C++20)   
Helper templates  |  |   
template  < class  Val  >  
using  istream_view  =  ranges  ::  basic_istream_view  < Val,  char  > ;  |  (2)  |  (since C++20)   
template  < class  Val  >  
using  wistream_view  =  ranges  ::  basic_istream_view  < Val,  wchar_t  > ;  |  (3)  |  (since C++20)   
Customization point objects  |  |   
namespace  views  {  
template  < class  T  >  
inline  constexpr  /*unspecified*/  istream  =  /*unspecified*/  ;  
}  |  (4)  |  (since C++20)   
Helper concepts  |  |   
template  < class  Val,  class  CharT,  class  Traits  >  
concept  /*stream-extractable*/  =  
requires  (  [ std::  basic_istream
](http://en.cppreference.com/w/cpp/io/basic_istream) < CharT,Traits  > & is,
Val  & t  )  {  
is  >> t  ;  
}  ;  |  (5)  |  (  exposition only*  )   
|  |   
  
1)  A range factory that generates a sequence of elements by repeatedly
calling  operator  >> .

2,3)  Convenience alias templates for character types  char  and  wchar_t  .

4)  views  ::  istream  < T  > (  e  )  is [ expression-equivalent
](/w/cpp/language/expressions#Expression-equivalence
"cpp/language/expressions") to (has the same effect as)  ranges  ::
basic_istream_view  < T,  typename  U  ::  char_type  ,  typename  U  ::
traits_type  > (  e  )  for any suitable subexpressions  e  , where ` U ` is
[ std::  remove_reference_t
](http://en.cppreference.com/w/cpp/types/remove_reference) < decltype  (  e  )
> . The program is ill-formed if ` U ` is not both publicly and unambiguously
derived from  [ std::  basic_istream
](http://en.cppreference.com/w/cpp/io/basic_istream) < typename  U  ::
char_type  ,  typename  U  ::  traits_type  > , which may result in a [
substitution failure ](/w/cpp/language/sfinae "cpp/language/sfinae") .

5)  The exposition-only concept  /*stream-extractable*/  < Val,CharT,Traits  >
is satisfied when lvalue of ` Val ` can be extracted from lvalue of  [ std::
basic_istream  ](http://en.cppreference.com/w/cpp/io/basic_istream) <
CharT,Traits  > .

The iterator type of ` basic_istream_view ` is move-only: it does not meet the
[ LegacyIterator  ](/w/cpp/named_req/Iterator "cpp/named req/Iterator")
requirements, and thus does not work with pre-C++20 [ algorithms
](/w/cpp/algorithm "cpp/algorithm") .

##  Contents

  * 1  Customization point objects 
  * 2  Member functions 
    * 2.1  Inherited from  std::ranges::view_interface 
  * 3  std::ranges::basic_istream_view::  basic_istream_view 
  * 4  std::ranges::basic_istream_view::  begin 
  * 5  std::ranges::basic_istream_view::  end 
    * 5.1  Nested classes 
    * 5.2  Example 
    * 5.3  Defect reports 
    * 5.4  See also 

  
---  
  
###  Customization point objects

The name