[Bug c++/57064] [clarification requested] Which overload with ref-qualifier should be called?
thiago at kde dot org
gcc-bugzilla@gcc.gnu.org
Thu Apr 25 06:51:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57064
--- Comment #6 from Thiago Macieira <thiago at kde dot org> 2013-04-25 06:51:33 UTC ---
void f(A &&a)
{
std::move(a).p();
}
_Z1fO1A:
.cfi_startproc
jmp _ZNR1A1pEv@PLT #
.cfi_endproc
Then this looks like a bug in 4.8.1.
But then are we in agreement that a.p() in that function above should call the
lvalue-ref overload? It does make the feature sligthly less useful for me. It
would require writing:
return std::move(std::move(std::move(std::move(QString("%1 %2 %3 %4")
.arg(42))
.arg(47))
.arg(-42))
.arg(-47));
More information about the Gcc-bugs
mailing list