On 09/07/2011 05:28 AM, Brad Roberts wrote:
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,
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 a
> Actually not expression templates. I am porting a BDD (Binary decision
> diagrams) library from C++ to D. The comparison operators are just
> implemented as relations that return another BDD. A BDD would then
> evaluate to 0 or 1 depending on many other factors and other BDDs. A
> BDD actually re
>>> 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 work
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
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
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?