[Issue 3967] bool opEquals() for structs instead of int opEquals()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 7 03:20:09 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3967
--- Comment #3 from bearophile_hugs at eml.cc 2010-08-07 03:20:00 PDT ---
It's not a spec issue, this code compiles and runs with DMD 2.047 still:
import std.c.stdio: printf;
struct Foo {
int data;
int opEquals(T:Foo)(T other) {
printf("A");
return this.data == other.data;
}
}
void main() {
int r = Foo(5) == Foo(5);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list