How do you safely deal with range.front?
ag0aep6g
anonymous at example.com
Sun Dec 31 17:13:13 UTC 2017
On 12/31/2017 02:14 PM, aliak wrote:
> Also, is going out of array bounds well defined behavior in D even with
> boundscheck off?
No. Without the checks you get undefined behavior. I.e.,
`-boundscheck=off` defeats the `@safe` attribute. For that reason, I'd
advise against ever using it. Definitely don't think of it as a harmless
optimization switch.
More information about the Digitalmars-d-learn
mailing list