Steven Schveighoffer Wrote:

> You did not define a way to compare two S structs.  Try redefining S like  
> this:
> 
> struct S {
>    string label;
>    int opCmp(ref const S s2) const {
>       if(label < s2.label)
>         return -1;
>       if(label > s2.label)
>         return 1;
>       return 0;
>    }
> }

You know, I didn't think about this because struct arrays are sorted by the 
first element if you do array.sort. But this does make the error a little more 
clear.

Reply via email to