Richard Webb Wrote:

> Hi,
> I mentioned this problem in the thread @ 
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=18405
> 
> I ran into the rvalue problem while trying to get Juno to compile, and found 
> that it builds ok if you declare both
> 
> bool opEquals(const ref Foo rhs) const
> 
> and
> 
> bool opEquals(Foo rhs) const
> 

Note the resulting bug: http://d.puremagic.com/issues/show_bug.cgi?id=3607

I also don't believe Richard's workaround is a "solution".  The compiler should 
not force you to create a const ref version if the argument can be implicitly 
cast from const to mutable.

-Steve

Reply via email to