inout and opApply

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 22 03:28:38 PDT 2016


On Monday, 20 June 2016 at 15:09:22 UTC, Steven Schveighoffer 
wrote:
> int opApply(scope int delegate(ref inout T value) dg) inout
>
> The inout inside the delegate is wrapped just like the inout of 
> the 'this' parameter. effectively, this becomes equivalent to 
> several function signatures:
>
> int opApply(scope int delegate(ref T value) dg)
> int opApply(scope int delegate(ref const T value) dg) const
> int opApply(scope int delegate(ref immutable T value) dg) 
> immutable
> int opApply(scope int delegate(ref inout T value) dg) inout

AFAIK, there was a bugzilla issue for it. Wasn't it implemented?


More information about the Digitalmars-d mailing list