opCmp with structs
    Alex via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sat Nov  7 06:53:46 PST 2015
    
    
  
On Saturday, 7 November 2015 at 14:36:25 UTC, Mike Parker wrote:
>>
>> So my general question is: why immutable variables shouldn't 
>> be able to be moved (inside an array)?
>>
> To be pedantic, sort isn't actually moving anything. It's 
> reassigning elements, i.e. a[1] = a[2]. The immutable member 
> makes it illegal to assign one instance of ku to another:
> But sort doesn't work that way. You'll need to take a different 
> approach to sort an array of ku.
Yeah... and I'm in the acceptance phase now ;) Do you have a 
hint, how this approach could be like?
    
    
More information about the Digitalmars-d-learn
mailing list