On Tuesday, September 06, 2011 9:09:06 AM, Timon Gehr wrote: > On 09/06/2011 04:13 PM, d coder wrote: >> Greetings >> >> It seems D assumes that these operators should return a bool value. >> 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? >> >> Regards >> - Puneet > > That is currently impossible. =/ > You'll have to use named member functions, eg. less, greater and equal.
Normally I try to avoid nit picking phrasing in public forums, but in this case it's important. It's not just 'currently' impossible, it's by design with no intention to change. Later, Brad