Return by 'ref' problems...

Jakob Ovrum jakobovrum at gmail.com
Fri May 4 06:00:39 PDT 2012


On Friday, 4 May 2012 at 12:45:23 UTC, Timon Gehr wrote:
> This should work:
>
> const(Thing) function()ref blah2 = &func;
>
> Except that it does not, because 'ref' is not currently a valid 
> function 'storage class'. This seems to be an issue that 
> deserves a bug report.

For ref functions, 'ref' is part of the return type syntax, much 
like auto functions. There is no precedent for 'ref' working as a 
function attribute; it never was one.



More information about the Digitalmars-d mailing list