Kinds of containers

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 22 10:13:46 PDT 2015


On Thursday, 22 October 2015 at 16:29:19 UTC, bitwise wrote:
> Maybe look at the code next time before you LOL......

My point would be the same regardless. Range!(const T) and 
const(Range!T) - and Container!(const T) and const(Container!T) - 
have no relation as far as the compiler is concerned, and that 
makes dealing with const correctly a royal pain - particularly if 
you want a range to act like an array like it's supposed to be 
able to do (at least insofar as they have the same operations). 
You asked what deadalnix meant by

> The elephant in the room: make the template parameter's type 
> qualifier transitive
> with the collection's qualifier.

and I tried to explain.

- Jonathan M Davis


More information about the Digitalmars-d mailing list