The Status of Const

Michel Fortin michel.fortin at michelf.com
Mon Aug 16 08:30:10 PDT 2010


On 2010-08-16 11:23:24 -0400, Michel Fortin <michel.fortin at 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.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list