On Tuesday, 3 August 2021 at 13:23:04 UTC, Tejas wrote:
No. ```ref``` can only be used as a function/template. or ```foreach``` parameter.
Yeah, I know. I was in hope of a DIP or something.I just would like to hijack the reference chain to do something like:
```d void fun() { ref T rs; scope(failure) { rs.close(); } rs = query(); otherFunc(rs); } ``` I removed the ref and changed my code to use pointers instead.