Return by 'ref' problems...
Jakob Ovrum
jakobovrum at gmail.com
Fri May 4 08:07:43 PDT 2012
On Friday, 4 May 2012 at 14:57:14 UTC, Timon Gehr wrote:
>
> What would be the meaning of
>
> void foo(ref void function() fn) { }
>
> ?
Parameter storage classes can only go before the type, while
function attributes can also go after the parameter list (of the
function pointer or delegate for this case). So I would think
that:
void foo(ref void function() fn) { }
The above 'foo' would receive a function pointer by reference,
while:
void foo(void function() ref fn) { }
Would receive a function pointer which returns by ref.
More information about the Digitalmars-d
mailing list