contiguous ranges

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 16 02:53:32 PST 2015


Vlad Levenfeld:

> a ContiguousRange would be any RandomAccessRange which has a 
> member called ptr which supports a dereferencing operator * 
> that yields an ElementType!R. This notion is useful for 
> functions which might otherwise perform an element-by-element 
> transfer to an OutputRange via put, instead perform an 
> optimized batch transfer directly to a ContiguousRange via ptr.

Increasing the number of basic ranges will lead to a little more 
complexity, but this seems a nice idea.

Bye,
bearophile


More information about the Digitalmars-d mailing list