-preview=in might break code
tsbockman
thomas.bockman at gmail.com
Fri Oct 2 22:46:11 UTC 2020
On Friday, 2 October 2020 at 22:27:33 UTC, Ola Fosheim Grøstad
wrote:
> Yes, but if you want passbyvalue for small structs all the time
> then you need to define enabling constraints as udefined
> behaviour.
That's fine. I never suggested otherwise.
> The only viable alternative is to only get the optimization
> when it provably has the same effect.
As I said earlier in this thread, if people are very worried
about the undefined behavior, then perhaps the cases which are
not proven by the compiler to have the same effect should be
@system. There are essential features in D already that cannot be
verified by the compiler; that's what @system is for.
More information about the Digitalmars-d
mailing list