[Issue 11176] array.ptr in @safe code

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 25 10:19:37 PST 2016


https://issues.dlang.org/show_bug.cgi?id=11176

--- Comment #12 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Kenji Hara from comment #11)
> I noticed that we already have equivalent but safer way &arr[0]. Under @safe
> attribute, it checks the 'arr' boundaries and throws RangeError if the index
> access is invalid.
> 
> So, disabling arr.ptr would not have so big impact.

Excellent point! I think this solidifies the position we should have.

--


More information about the Digitalmars-d-bugs mailing list