[Issue 3607] Problems with struct opEquals and const

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3607

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|2.036   |D2

--


[Issue 3607] Problems with struct opEquals and const

2011-06-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3607


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||DUPLICATE


--- Comment #4 from yebblies yebbl...@gmail.com 2011-06-12 22:44:02 PDT ---
*** This issue has been marked as a duplicate of issue 3659 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3607] Problems with struct opEquals and const

2010-12-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3607


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

Summary|Regression(2.037) Problems  |Problems with struct
   |with struct opEquals and|opEquals and const
   |const   |
   Severity|regression  |enhancement


--- Comment #2 from Don clugd...@yahoo.com.au 2010-12-01 03:12:08 PST ---
The error message is correct, and the code compiles if you change the signature
to ref const Foo. The spec clearly states:
If structs declare an opEquals member function, it should follow the following
form:

struct S {
int opEquals(ref const S s) { ... }
}


A key point in the forum discussion, which was missing from the bug report was
this comment:

 I think it should be allowed to have a signature like this:
 bool opEquals(T other) const
 inside T as long as T can be implicitly cast from const to mutable.

Changing to an enhancement request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---