On Monday, 25 August 2025 at 08:36:05 UTC, Nick Treleaven wrote:
On Monday, 25 August 2025 at 00:42:33 UTC, Steven Schveighoffer wrote:
On Sunday, 24 August 2025 at 20:43:15 UTC, Ali Çehreli wrote:

I think you went a little further in that section and made the return 'auto ref', which does not (and should not) fail compilation.

No. auto ref is only for templates. This is a bug and should not compile.

An auto ref function does not need to be a template because the ref-ness does not depend on how it's called.

https://dlang.org/spec/function.html#auto-ref-functions

Well today I learned this. But it is true for auto ref params.

Still, the op code compiling is a bug as the return value is not an rvalue.

-Steve

Reply via email to