opEquals for structs
Mafi
mafi at example.org
Sun Jan 9 08:45:31 PST 2011
Just tried to implemnt Perl6-like junctions. Despite template functions
overloading against varadic and non-variadic (ie T[] and T[]...) does
not work, why has a struct opEquals to be S.opEquals(ref const(S))? Why
can't I compare a class against a struct or in my case a struct against
an int? I can't even compare a struct against a struct of another type.
I'm curious for the reason of this.
Mafi
More information about the Digitalmars-d
mailing list