On 08/20/2014 07:40 AM, Beman Dawes wrote:
The need for such a thing is an unfortunate side-effect of the fact that a range's begin and end iterators must have the same type. I'm building a range library that loosens that restriction and writing a proposal to get it into the standard. I'd be curious if you have experience about scenarios where using your ntcts_iterator is faster or slower that simply finding the end of the string first with strlen and then calling the algorithm with raw pointers. I've blogged about my work here: http://ericniebler.com/2014/02/16/delimited-ranges/ http://ericniebler.com/2014/02/18/infinite-ranges/ http://ericniebler.com/2014/02/21/introducing-iterables/ http://ericniebler.com/2014/02/27/ranges-infinity-and-beyond/ http://ericniebler.com/2014/04/27/range-comprehensions/ My proposal is coming together here: https://github.com/ericniebler/range-v3/blob/master/doc/D4128.md Disclaimer: it's in a *very* rough, incomplete state. Eric