Zero-length static array spec

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 7 04:47:16 PST 2015


On Saturday, 7 February 2015 at 12:10:45 UTC, Iain Buclaw wrote:
> Some cod scenarios:
> 1. Comparisons of == fold into 'false'  (unless comparing to 
> self)
> 2. Comparisons of != fold into 'true'  (unless comparing to 
> self)
> 3. Conversion to dynamic arrays is { .length=0, .ptr=&arr0 }

What does "arr0" refer to?

And assuming that a0.ptr and a1.ptr would end up being the same 
in your proposal, do you really want to have a situation where 
a0.ptr == a1.ptr && a0.length == a1.length but a0 != a1?

David


More information about the Digitalmars-d mailing list