strange behavior in opApply
    Frits van Bommel 
    fvbommel at REMwOVExCAPSs.nl
       
    Sat Jan 27 15:23:29 PST 2007
    
    
  
BCS wrote:
> The foreach body is turned into a delegate taking (inout int), but it is 
> not marked as inout! I have a case where I'm trying to use opApply where 
> it can't be inout.
> Is this a bug?
According to the spec, the signature of opApply must be "int opApply(int 
delegate(inout Type [, ...]) dg);", so it's actually a bug in your code 
that the delegate's parameter it isn't marked inout.
(unless of course you prefer to consider it a 'bug' in the spec that 
it's not allowed to be marked 'in' :) )
    
    
More information about the Digitalmars-d-bugs
mailing list