[Issue 11176] array.ptr in @safe code

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 25 08:23:39 PST 2016


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

--- Comment #11 from Kenji Hara <k.hara.pg at gmail.com> ---
It was just an idea. Indeed, it would be a case that the conditional behavior
is worse than simple disabling.

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.

--


More information about the Digitalmars-d-bugs mailing list