On Mon, 16 Aug 2010 11:30:10 -0400, Michel Fortin <michel.for...@michelf.com> wrote:

On 2010-08-16 11:23:24 -0400, Michel Fortin <michel.for...@michelf.com> said:

Shouldn't this work?
        struct Array(V) {
                uint length;
                V *v;
                Array!(const V) _const() @property { ... }
                alias _const this;
        }

Well, it doesn't, but perhaps it should.

I agree that implicit conversions is the core of the problem for tail-const in structs.

If the mechanism isn't automatic, and involves doing stuff like this, I don't see it being used much. The compiler has to help here somewhere.

-Steve

Reply via email to