InternetAddress comparison fail

MattCoder via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 2 18:03:05 PST 2015


On Saturday, 3 January 2015 at 01:59:40 UTC, MattCoder wrote:
> I believe you need to compare the values inside those class 
> right?

I forgot to paste an example:

import std.stdio;

class foo{
  int i = 0;
  bool opEquals(foo obj){ return this.i == obj.i;}	
}

void main(){
   auto a = new foo;
   auto b = new foo;
   assert(a.opEquals(b));
}

Matheus.


More information about the Digitalmars-d mailing list