range.save

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 23 17:53:39 PST 2015


On 11/23/15 8:38 PM, Freddy wrote:

> Not quite what I was thinking. I was saying that ranges that implement
> back,popBack may need to implement a backwards buffer along a forward
> buffer even if the backwards buffer is never used.

Maybe you are saying that if you want to implement indexing, you must 
also implement back and popBack? Note that if you don't implement 
something, it just doesn't get qualified as that type of range, so it's 
definitely possible to have indexing, but not back and popBack (although 
if range[$-1] is possible, then wouldn't that easily qualify as back?). 
So I don't really understand still.

I think your issue may be better described with an example.

-Steve


More information about the Digitalmars-d mailing list