On 11/8/2011 12:44 AM, Don wrote:
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'.
inout can implicitly convert to const, but const cannot implicitly convert to inout, hence the error on the return x;
But you're right, use inout in the body, and it is treated much like const.
