Shout out to D at cppcon, when talkign about ranges.

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 13:08:43 PDT 2015


OK, I thought a little more and... Name: divisible range. It 
occurred to me that we only need to reverse logic of 
bidirectional range: while bidirectional range is a pair of 
ranges that shrink towards each other, divisible range is divided 
into two ranges that shrink away from each other. The C++ example 
implies that begin and end must be bidirectional iterators, but 
that is not really needed as they are used for bounds checks 
only, ranges have empty for that, so the divisible range can be a 
normal input range that provides access to its left part that 
shrinks from back (backward input range?) and provides access to 
the right part.


More information about the Digitalmars-d mailing list