-preview=in might break code

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Oct 2 22:16:19 UTC 2020


On Friday, 2 October 2020 at 21:57:06 UTC, Daniel N wrote:
> "Therefore, if more than one reference to the same data is 
> passed to a function, they must all be const."

Impossible to prove at compiletime in the general case.

Way too expensive to check at runtime as well as the aliasing can 
happen deep down in a graph.

So you need to specify it as undefined behaviour.





More information about the Digitalmars-d mailing list