-preview=in might break code

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Oct 4 23:06:58 UTC 2020


On Sunday, 4 October 2020 at 20:42:17 UTC, kinke wrote:
> On Sunday, 4 October 2020 at 20:06:49 UTC, Iain Buclaw wrote:
> `in`. Secondly, as the potential aliasing problem regards the 
> callers, not the callee, a simple rule of thumb should be 
> something along the lines of: "If you wouldn't pass the lvalue 
> arg to a `const scope ref` parameter due to aliasing concerns, 
> then don't pass it to `in` either without an explicit

You need to know the implementation as parameters can alias with 
globals accessed by the function. So not caller only.

The docs should list everything you need to be mindful of in 
order to get consistent behaviour from any compliant compiler.


More information about the Digitalmars-d mailing list