[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: overloading __lt, __le to return a userdefined object
- From: "Mustafa K. Atlihan" <mkatlihan@...>
- Date: Fri, 20 May 2011 13:10:33 +0300
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...
I think this is an important one to be considered for a fix in the coming
version. Normally, the caller should have the means to define what the
output of a logical comparison, e.g. obj3 = obj1 < obj2.
Any suggestions for a workaround would be highly appreciated. I currently
use local functions that allows computation of obj3 = myLT(obj1,obj2).
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 6137 (20110520) __________
The message was checked by ESET NOD32 Antivirus.