https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67961

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to other+gcc from comment #0)
> where type of that rvalue variable is uint32_t not std::size_t.

There is no rvalue of type uint32_t. The type of the **lvalue** is uint32_t.

The rvalue is the temporary that gets created implicitly, which is of type
size_t.


FWIW clang doesn't mention rvalues, it just says there is no matching function
for the call because ...

prog.cc:4:6: note: candidate function not viable: no known conversion from
'std::uint32_t' (aka 'unsigned int') to 'std::size_t &' (aka 'unsigned long &')
for 1st argument

Reply via email to