spir Wrote: > Hello, > > I thought it worked, just like implicite deref on (struct, class) member > access. But I cannot have it work: > > auto a = [1,2,3]; > auto pa = &a; > writeln((*pa)[2]); // ok > writeln(pa[2]); // segfault
You aren't making a pointer to the data, only the array. I probably would have made the same mistake, but I think you want to use: auto pa = a.ptr; Don't know if there is a ptr property for array.