On Fri, 24 Feb 2012 21:36:21 +0100, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:

On 2/24/12, simendsjo <simend...@gmail.com> wrote:
I don't get it. This gives me a dynamic array, not a static:
     char[1] a;
     auto b = cast(void*)a;
     auto c = (cast(char*)b)[0..1];
     c.length = 10; // auch!


You can do:
char[1] c = (cast(char*)b)[0..1];

Thanks! I had to do an explicit cast(char[1]) (or actually char[1][1] in my case.)

Reply via email to