What's the correct opEquals signature for structs?
Jesse Phillips
Jessekphillips+D at gmail.com
Tue Mar 13 11:43:41 PDT 2012
On Tuesday, 13 March 2012 at 18:28:27 UTC, Johannes Pfau wrote:
> My std.uuid module doesn't compile with the latest dmd. I guess
> it's
> because of a wrong opEquals signature, this is what I have now:
>
> ----------
> @safe pure nothrow bool opEquals(ref const UUID s) const
> {
> return s.data == this.data;
> }
> ----------
I think Alex is right, does auto ref work for parameters?
@safe pure nothrow equals_t opEquals(auto ref const UUID s) const
More information about the Digitalmars-d-learn
mailing list