What's the correct opEquals signature for structs?

Jonathan M Davis jmdavisProg at gmx.com
Tue Mar 13 17:10:00 PDT 2012


On Tuesday, March 13, 2012 22:03:45 Alex Rønne Petersen wrote:
> Did you see my other post? Maybe we could do something like this:
> 
> equals_t opEquals()(const auto ref SysTime rhs) const pure nothrow

That would probably work (though I wouldn't use equals_t, since it seems like 
an utterly pointless alias to me). Still, it shouldn't have to be templated to 
work with auto ref.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list