The official C++ Weekly Repository. Code samples and notes of future / past episodes will land here at various times. PR's will be accepted in some cases.
The Unlicense
663
stars
24
forks
source link
std::generator, any_range, type erased ranges and iterators #381
Based on your simple generator episode I would suggest a episode about type erased ranges and why they can be great in some cases.
Range V3 had an any_range, Folly has one I think, also it they have been proposed in a number of places. There are also examples of type erased iterators which are closely related. std::generator itself is a type erased range.
So why do these get proposed and implemented in various libraries? Why did they not make the cut to get in to the standard library?
What are the trade offs of using them?
Based on your simple generator episode I would suggest a episode about type erased ranges and why they can be great in some cases.
Range V3 had an any_range, Folly has one I think, also it they have been proposed in a number of places. There are also examples of type erased iterators which are closely related. std::generator itself is a type erased range.
So why do these get proposed and implemented in various libraries? Why did they not make the cut to get in to the standard library? What are the trade offs of using them?