Rvalue references - The resolution

Walter Bright newshound2 at digitalmars.com
Sat May 4 16:52:09 PDT 2013


On 5/4/2013 4:47 PM, Diggory wrote:
> What about this:
>
> void foo(ref int i);
> void foo(ref const(int) i);
>
> void main() {
>      int i;
>      foo(i);
>      foo(1);
> }
>
> What do they match here?

An rvalue ref is not const, so (1) would match the same as (i) does.


More information about the Digitalmars-d mailing list