[Issue 7175] Zero-length static array .ptr is always null

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 27 01:37:24 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=7175



--- Comment #3 from yebblies <yebblies at gmail.com> 2013-11-27 20:37:22 EST ---
(In reply to comment #2)
> Do you mean in this code:
> 
> [snip]
> 
> 
> The data() function will be written just like this?
> 
>     @property T[] data() inout pure nothrow {
>         return items.ptr[0 .. len];
>     }

Looks like you'll still need to cast away inout in that example, but yeah.

Where a is a zero-length static array a.ptr -> &a

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list