Open JeffGarland opened 5 years ago
It's called basic_istream_view
in cpp20. It was missing from the namespace, but I added it last week. Can you update to the current master and check if you find it?
I was up to date with trunk as of yesterday, I assume it's there :) However:
relative to N4830 - section 24.7.15.2 [range.istream.view]
para 3:
template<class Val, class CharT, class Traits>
basic_istream_view<Val, CharT, Traits> istream_view(basic_istream<CharT, Traits>& s);
Effects: Equivalent to: return basic_istream_view<Val, CharT, Traits>{s};
see also example in range.take.while.overview
auto input = istringstream{"0 1 2 3 4 5 6 7 8 9"};
auto small = [](const auto x) noexcept { return x < 5; };
auto small_ints = istream_view<int>(input) | views::take_while(small);
Ah, you are correct. I overlooked that one.
From the docs I get the impression we should now be able to use ranges::cpp20. This compiles and works fine just using the ranges:: namespace.
https://godbolt.org/z/9fmFJX