-preview=in might break code
Timon Gehr
timon.gehr at gmx.ch
Mon Oct 5 09:57:46 UTC 2020
On 05.10.20 09:56, Iain Buclaw wrote:
>
>
> Correct me if I'm wrong, but it looks like we'll have three competing
> implementations:
>
> DMD: `const scope`, with `ref` applied on types usually passed in memory.
> LDC: `const scope ref @restrict`
> GDC: `const scope` with `ref` applied on types usually passed by
> invisible reference.
Weren't there different rules for non-POD types? Do those differ between
backends?
Also, it looks like in this case `__traits(isRef, ...)` will return
different results with different compiler backends and aliasing `in`
parameters is UB with LDC? Is `@restrict` wrongly treated as `@safe` or
does the `@safe`ty of `in` parameters depend on the compiler backend?
More information about the Digitalmars-d
mailing list