const
Janice Caron
caron800 at googlemail.com
Fri Mar 28 11:06:28 PDT 2008
On 28/03/2008, Sean Kelly <sean at invisibleduck.org> wrote:
> > The only way I can see of achieving this is if char and const(char)
> > are distinct types.
>
> Or if there are two distinct container types. ie.
>
> MyCotainerView!(char) and MyContainer!(char).
Right. But that would mean that MyContainer could never behave like a
built-in array. The ability to mimic built-in arrays with custom
containers is highly desirable, as I'm sure you will agree. So, if I
want MyContainer!(char) to mimic char[], and MyContainer!(const(char))
to mimic const(char)[], then I really need to make that distinction.
More information about the Digitalmars-d
mailing list