Find struct not passed by reference

frame frame86 at live.com
Tue Aug 3 12:23:38 UTC 2021


On Tuesday, 3 August 2021 at 11:55:51 UTC, Paul Backus wrote:

> You can't assign a `ref` to a variable; if you try, a copy is 
> created.
>
> What you can do instead is use a pointer:
>
> ```d
> Unique!myType* rs = &query();
> ```

Thanks. I feared that. So something like

```
ref T var = ...
```

does not exist (yet)?



More information about the Digitalmars-d-learn mailing list