Understanding lvalue and rvalue

ANtlord via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 28 00:56:14 PDT 2017


On Friday, 28 April 2017 at 05:21:26 UTC, ag0aep6g wrote:
>
> Instead of removing `in`/`const` from the ref overload, you can 
> also add it to the non-ref overload. Again, the overloads will 
> have the same match level ("match with conversion to const"), 
> and the ref version will win.

It works. I don't know why I've decided to make rvalue parameter 
non-const. It makes sense.

It's clear answer. Thank you very much!


More information about the Digitalmars-d-learn mailing list