Is an automatic string variable a dynamic array in the sense of sec. 10.11.2 "Identity Expression" par. 4?

ag0aep6g anonymous at example.com
Fri Jul 15 14:50:48 UTC 2022


On Friday, 15 July 2022 at 13:34:03 UTC, kdevel wrote:
> The rule [1] states:
>
>     For [...] dynamic arrays, identity is defined as referring 
> to the same
>     array elements and the same number of elements.
>
> [BTW: Every two arrays having the same elements implies that 
> they also have the same **number** of elements. Hence the 
> second condition is redundant.]

"Referring to the same array elements" is supposed to mean that 
the `.ptr` is the same. Maybe the phrasing can be improved.


More information about the Digitalmars-d mailing list