Static Array Idiom not working anymore.
Guillaume Piolat
first.last at gmail.com
Tue Jun 12 14:57:26 UTC 2018
On Tuesday, 12 June 2018 at 14:44:12 UTC, Steven Schveighoffer
wrote:
>
> Note to ponce, please update your idioms, this is NOT safe,
> even within the same function. Just because it does work,
> doesn't mean it will always work. The language makes no
> guarantees once the lifetime is over.
>
> -Steve
I thought it was clear enough because the comment said
// Slice that static array __which is on stack__
but now I see how it can be hard to see the unsafety.
More information about the Digitalmars-d-learn
mailing list