Heromyth: > I have defined a opCmp function to overload comparison operators, then how can > I use it correctly?
I don't have an answer yet, but I suggest you to look at the D docs that describe how to use opCmp. Probably you need to accept a const Object, and to use override. I suggest to strip your code from all the not essential things, so you will see the problems better. Bye, bearophile