24 Ranges library [ranges]

24.6 Range factories [range.factories]

24.6.5 Istream view [range.istream]

24.6.5.1 Overview [range.istream.overview]

basic_­istream_­view models input_­range and reads (using operator>>) successive elements from its corresponding input stream.
The name views​::​istream<T> denotes a customization point object ([customization.point.object]).
Given a type T and a subexpression E of type U, if U models derived_­from<basic_­istream<typename U​::​char_­type, typename U​::​traits_­type>>, then the expression views​::​istream<T>(E) is expression-equivalent to basic_­istream_­view<T, typename U​::​char_­type, typename U​::​traits_­type>(E); otherwise, views​::​istream<T>(E) is ill-formed.
[Example 1: auto ints = istringstream{"0 1 2 3 4"}; ranges::copy(ranges::istream_view<int>(ints), ostream_iterator<int>{cout, "-"}); // prints 0-1-2-3-4- — end example]