pointers, assignments, Garbage Collection Oh My?

Jacob Carlborg doob at me.com
Thu Jul 11 00:23:48 PDT 2013


On 2013-07-10 20:22, Ali Çehreli wrote:

> And to be pedantic, length comes first:
>
> struct Array (T)
> {
>      size_t length;
>      T* ptr;
> }

I thought "ptr" came first, that's the reason you could cast to the 
pointer type. Not that one should do that. Perhaps there's some 
compiler/runtime magic involved.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list