Find struct not passed by reference

frame frame86 at live.com
Tue Aug 3 10:25:34 UTC 2021


On Monday, 2 August 2021 at 23:19:48 UTC, jfondren wrote:
> On Monday, 2 August 2021 at 23:06:42 UTC, frame wrote:
>> Is there a way to find a struct which should be passed by 
>> reference but accidentally isn't? Maybe with copy constructors?
>
> @disable postblit:

Well, I have to change a struct to be passed by reference now and 
don't want to manually inspect where the compiler complains - 
which is nearly everwhere. The compiler would also not 
distinguish between a reference assignment.

> std.typecons.Unique:

This could work, thanks for the hint.




More information about the Digitalmars-d-learn mailing list