[Bug c++/50285] no known conversion for argument 1: 'X' to 'X'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50285 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED CC||manu at gcc dot gnu.org Resolution||INVALID --- Comment #2 from Manuel López-Ibáñez manu at gcc dot gnu.org 2011-10-10 12:00:07 UTC --- I don't get why this is WAITING, if you have suggestions on how to improve the diagnostic, please REOPEN. Otherwise this is not a bug. Clang prints something similar: /tmp/webcompile/_26316_0.cc:11:5: error: no viable overloaded '=' x = f(); ~ ^ ~~~ /tmp/webcompile/_26316_0.cc:3:6: note: candidate function not viable: no known conversion from 'X' to 'X ' for 1st argument X operator=(X); ^ 1 error generated.
[Bug c++/50285] no known conversion for argument 1: 'X' to 'X'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50285 --- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2011-10-10 12:15:44 UTC --- (In reply to comment #2) I don't get why this is WAITING Really? The OP never provided any source that demonstrates the bug so I couldn't be sure if my guess was right or if they found a real bug. When an incomplete bug report is submitted the usual response is to request more details and set WAITING. As feedback has not been forthcoming I agree with closing it.
[Bug c++/50285] no known conversion for argument 1: 'X' to 'X'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50285 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2011-09-04 Ever Confirmed|0 |1 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2011-09-04 18:06:54 UTC --- An error message is not a bug, please follow the bug reporting instructions and provide source code for a testcase demonstrating your problem: http://gcc.gnu.org/bugs/ The message clearly isn't about converting a type to itself, it's about converting a type to a non-const lvalue reference to that type (X is not the same as X) I assume it means you're trying to pass an rvalue (e.g. a temporary) to a function that requires an lvalue e.g. this produces a similar error struct X { X operator=(X); }; X f(); void g() { X x; x = f(); }