[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: overloading __lt, __le to return a userdefined object
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 20 May 2011 12:16:16 +0200
On Fri, May 20, 2011 at 12:10 PM, Mustafa K. Atlihan
> It doesn't seem possible to overload __lt, __le to return a result other
> than a boolean. This is in contrast to other operators __add, __sub, etc...
It would be useful sometimes, but I think the problem was doing it
efficiently in a way that would not slow down regular comparisons.
And if so, why not 'overload' the other comparison operators, 'and' and 'or' ??