On 08.11.2011 09:33, Walter Bright wrote:
On 11/8/2011 12:16 AM, Timon Gehr wrote:
Nice article!

Thanks!


> It isn't a template, and inout can only be used on function
parameters and
the return value.

What about local variables?

Just use const for them.

This compiles:

inout(int *) foo(inout(int *) a)
{
   inout x = a;
   return x;
}

and it doesn't compile if you replace 'inout x' with 'const x'.

Reply via email to