On 09/06/2011 07:21 PM, Trass3r wrote:
For example a < b is re-written as a.opCmp(b) < 0. In my application, I wanted to overload comparison and equality operators to return user defined values. Is that possible in D? If so how?What are you trying to do? In the end opCmp can return any value or object that works in the rewritten case 'a.opCmp(b) < 0'.
Which is a fancy way of returning an int. Probably he wants to implement expression templates.