libunifex
libunifex copied to clipboard
Generalise range_stream to adapt arbitrary ranges to async-streams
The current implementation of range_stream
produces a stream of integers in some specified range.
This was largely built just so we had some kind of stream that we could test against, but it would be much more useful to change this to take an arbitrary range (view/container) and allow construction of a stream that produces the elements of that range.
Existing uses of the range_stream
could be changed to range_stream(std::views::iota(min, max))
.
Or we could rename the existing stream iota_stream
and then add a more general range_stream
.