On 13-03-2012 19:43, Jesse Phillips wrote:
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
I think auto ref will only work if it is templatized (unfortunately).
But that just might work for structs, since it's not an overridden
function...
i.e.:
@safe pure nothrow equals_t opEquals()(auto ref const UUID s) const
--
- Alex