April 15, 2015 Re: Converting void* to D array | ||||
---|---|---|---|---|
| ||||
Posted in reply to CraigDillabaugh | On 4/15/15 11:02 AM, CraigDillabaugh wrote:
> Nice. Thanks. I didn't realize you can slice a bare pointer like that.
>
> Does druntime have any way of making sure that is safe, or are you on
> your own?
No, druntime cannot know what the pointer actually points at. This would not work in @safe code. It's on you to make sure it's valid.
-Steve
|
Copyright © 1999-2021 by the D Language Foundation