InternetAddress comparison fail
Jonathan Marler via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jan 3 16:37:18 PST 2015
On Sunday, 4 January 2015 at 00:13:21 UTC, Martin Nowak wrote:
> On 01/04/2015 12:45 AM, Martin Nowak wrote:
>> Sure, someone should make a pull and implement opEquals for
>> the Address
>> classes, maybe also opHash.
>
> In the meantime addr1.tupleof == addr2.tupleof is a useful
> workaround, but it can't handle polymorphism.
Ah I hadn't thought of using tupleof, works nicely. It will
compare the entire address struct (sockaddr_in) which is a few
extra comparisons then what is needed but that is pretty close.
I'll try to think of tupleof more often in the future. Thanks.
More information about the Digitalmars-d
mailing list