ericniebler / stl2

LaTeX and Markdown source for the Ranges TS/STL2 and associated proposals
88 stars 8 forks source link

Rename `basic_istream_view` to `istream_view` #632

Open cjdb opened 5 years ago

cjdb commented 5 years ago

I was under the mistaken impression that istream_iterator didn't support non-std::istream types based on its name, and so I named basic_istream_iterator as a "fix". Now that I know better, I think it should be renamed to istream_view, and we move the factory into namespace views as istream.

P1035R7 (and C++20 CD)

auto example1 = std::ranges::basic_istream_view<int>{std::cin};
auto example2 = std::ranges::istream_view<int>(std::cin);

Proposed

auto example1 = std::ranges::istream_view<int>{std::cin};
auto example2 = std::views::istream<int>(std::cin);