Operator overloading -- lets collect some use cases

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue Dec 30 07:31:33 PST 2008


Don wrote:
> A straightforward first step would be to state in the spec that "the 
> compiler is entitled to assume that X+=Y yields the same result as X=X+Y"

That doesn't hold for reference types, does it? So perhaps this should 
only be the case for structs? (Shouldn't make much difference, I think 
all of the examples I've seen would normally be implemented as structs 
rather than objects)



More information about the Digitalmars-d mailing list