On Monday, August 29, 2011 22:41:26 Sean Eskapp wrote:
I am trying to build a struct with equality testing, using this code:
struct Foo
{
const bool opEquals(Foo f)
{
return true;
}
}
This gives me the error that the parameter should be of type ref const
Foo.
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article
On Monday, August 29, 2011 22:41:26 Sean Eskapp wrote:
I am trying to build a struct with equality testing, using this code:
struct Foo
{
const bool opEquals(Foo f)
{
return true;
}
}
This
On Wed, 09 Mar 2011 11:40:25 -0500, SiegeLord n...@none.com wrote:
1) Why does this code not work (dmd 2.051) and how do I fix it:
struct S
{
static S New()
{
S s;
return s;
}
const bool opEquals(ref const(S) s)
{
Steven Schveighoffer Wrote:
It's a mis-designed feature of structs. There is a bug report on it:
http://d.puremagic.com/issues/show_bug.cgi?id=3659
It worked fine in D1. Or did you mean that the mis-designed feature is the
const system?
Anyway, thanks for the link to the bug report. I'll
On Wed, 09 Mar 2011 12:15:26 -0500, SiegeLord n...@none.com wrote:
Steven Schveighoffer Wrote:
It's a mis-designed feature of structs. There is a bug report on it:
http://d.puremagic.com/issues/show_bug.cgi?id=3659
It worked fine in D1. Or did you mean that the mis-designed feature is