[range.istream.overview]

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

## 25.6 Range factories [[range.factories]](range.factories#range.istream.overview)

### 25.6.6 Istream view [[range.istream]](range.istream#overview)

#### 25.6.6.1 Overview [range.istream.overview]

[1](#1)

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

basic_istream_view models [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") and
reads (using operator>>) successive elements
from its corresponding input stream[.](#1.sentence-1)

[2](#2)

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

The name views​::​istream<T> denotes
a customization point object ([[customization.point.object]](customization.point.object "16.3.3.3.5 Customization Point Object types"))[.](#2.sentence-1)

Given a type T and a subexpression E of type U,
if U models[derived_from](concept.derived#concept:derived_from "18.4.3 Concept derived_­from [concept.derived]")<basic_istream<typename U​::​char_type,typename U​::​traits_type>>,
then the expression views​::​istream<T>(E) is expression-equivalent tobasic_istream_view<T, typename U​::​char_type,typename U​::​traits_type>(E);
otherwise, views​::​istream<T>(E) is ill-formed[.](#2.sentence-2)

[3](#3)

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

[*Example [1](#example-1)*: auto ints = istringstream{"0 1 2 3 4"};
ranges::copy(views::istream<int>(ints), ostream_iterator<int>{cout, "-"});// prints 0-1-2-3-4- â *end example*]
