struct opCmp?
Robert Fraser
fraserofthenight at gmail.com
Thu May 14 18:44:39 PDT 2009
Nick Sabalausky wrote:
> "Lars T. Kyllingstad" <public at kyllingen.NOSPAMnet> wrote in message
> news:gui4ml$2g0n$1 at digitalmars.com...
>> I think you have to use opEquals to overload ==. opCmp only applies to <,
>> <=, >, and >=.
>>
>
> Oh, I figured either opEquals would be defined in terms of opCmp or an
> overloaded opCmp would imply a new opEquals defined in terms of it, or
> something like that.
I think if opCmp is defined and opEquals is not, an opEquals should be
implicitly defined in terms of opCmp. I've actually thought about making
my own "Object" class... ANyone else have a personalized Object they use?
More information about the Digitalmars-d-learn
mailing list