Re: const and mutable opApply's

2016-06-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/19/16 6:17 PM, Oleg B wrote: Hello ... How I can rewrite this code without mixin's and with one (maybe inout) opApply? Someone just asked a similar question about this: https://forum.dlang.org/post/nk90v2$1fr3$1...@digitalmars.com -Steve

const and mutable opApply's

2016-06-19 Thread Oleg B via Digitalmars-d-learn
Hello struct WTable { ... private enum opApply_body = q{ if( smt ) { foreach( f; 0 .. size-1 ) foreach( t; f+1 .. size ) if( auto r = dlg(f,t,data[getIndex(f,t)]) ) return r; } else { foreach