String to boolean inconsistency

Jonathan M Davis jmdavisProg at gmx.com
Sat Dec 11 19:16:29 PST 2010


On Saturday 11 December 2010 19:08:33 Simen kjaeraas wrote:
> Jonathan M Davis <jmdavisProg at gmx.com> 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


More information about the Digitalmars-d mailing list