Required constness of opEquals (and opCmp) ?

monarch_dodra monarchdodra at gmail.com
Wed Jan 2 02:11:50 PST 2013


On Wednesday, 2 January 2013 at 09:07:31 UTC, monarch_dodra wrote:
>
> Basically, a DList of tuples: Problem:
> DList has a "const correct" opEquals, but Tuple's isn't. It has:
> //----
> bool opEquals(R)(R rhs);       //1
> bool opEquals(R)(R rhs) const; //2
> //----
>
> The problem is that //2 should really be:
> //----
> bool opEquals(R)(const R rhs) const; //2
> //----

Well, at least starting this conversation allowed me to realize 
that my *fix* to the original problem was wrong...


More information about the Digitalmars-d mailing list