Array copy warning

Benjamin Thaut code at benjamin-thaut.de
Sun Oct 13 06:10:14 PDT 2013


I'm just in the progress of upgrading to dmd 2.063 and I now get the 
following warnings in my code:

  Warning: explicit element-wise assignment 
mem[cast(uint)0..this.length()] = (this.opSlice())[] is better than 
mem[cast(uint)0..this.length()] = this.opSlice()

I don't quite understand this warning. It doesn't make much sense to 
overload the slice operator if I can't use it the same way as the 
regular slice operator on a "normal" array. Whats the idea behind this 
warning?
-- 
Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list