C++ Logo


Advanced search

Re: [std-proposals] Specify that argument to function cannot be an rvalue

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 11 Oct 2022 11:48:18 +0100
On Tue, Oct 11, 2022 at 10:25 AM Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:

> It's passing lvalues to an overload set where all parameters are
> rvalue references,
> so the direct binding won't work, but via conversion, the int can be
> converted to a double,
> and the double to an int, and since the result of that conversion is
> an rvalue, the rvalue
> reference can then bind to it.

The part I don't understand is why it prints "double int" instead of
"int double".

Received on 2022-10-11 10:48:30