Well, it may be also a way to ensure the function doesn't modify
the struct.
Timon Gehr wrote:
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, ther
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 par