On 08/24/2012 12:14 AM, Piotr Szturmaj wrote:
Hi,

I found this code of std.range.iota's Result struct:

         @property inout(Value) front() inout { assert(!empty); return
current; }

What's the purpose of inout on parameterless functions?

It is a method of a struct, therefore it is not parameterless, but has
a hidden parameter. 'inout' qualifies the implicit 'this' reference.
Inside the method body, typeof(this) is inout(Result).

Reply via email to