On Saturday 11 December 2010 19:08:33 Simen kjaeraas wrote:
> Jonathan M Davis <[email protected]> wrote:
> > This behavior is intended. Arrays are actually something like this under
> > the hood:
> > 
> > struct array(T)
> > {
> > 
> >     T* arr;
> >     size_t length;
> > 
> > }
> 
> Actually, that is:
> 
> struct array(T)
> {
>      size_t length;
>      T* ptr;
> }
> 
> To get the layout and names right.
> ( http://digitalmars.com/d/2.0/abi.html )

Good point. Though actually, I don't think that that's quite right either, 
because it has capacity as well. It seems like there's an error in the 
documentation.

- Jonathan M Davis

Reply via email to