[Bug c++/63540] Erroneous "'Derived' declares a move constructor or move assignment operator" in error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63540 Paolo Carlini changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.0 --- Comment #4 from Paolo Carlini --- Fixed for 9.1.0, very likely by the patch which fixed PR89381.
[Bug c++/63540] Erroneous "'Derived' declares a move constructor or move assignment operator" in error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63540 --- Comment #3 from paolo at gcc dot gnu.org --- Author: paolo Date: Fri Mar 8 21:22:07 2019 New Revision: 269508 URL: https://gcc.gnu.org/viewcvs?rev=269508&root=gcc&view=rev Log: 2019-03-08 Paolo Carlini PR c++/63540 * g++.dg/cpp0x/implicit17.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/implicit17.C Modified: trunk/gcc/testsuite/ChangeLog
[Bug c++/63540] Erroneous "'Derived' declares a move constructor or move assignment operator" in error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63540 Daniel Adamski changed: What|Removed |Added CC||danregister at poczta dot fm --- Comment #2 from Daniel Adamski --- I have another variant of that issue: struct Base { Base() {} Base(const Base &) {} Base & operator=(Base &&) { return *this; } }; struct D1 : Base { using Base::operator=; D1 & operator=(const D1&) { return *this; } }; int main() { D1 x; D1 y = x; (void) y; } The error: test.cpp: In function ‘int main()’: test.cpp:19:12: error: use of deleted function ‘D1::D1(const D1&)’ D1 y = x; ^ test.cpp:10:8: note: ‘D1::D1(const D1&)’ is implicitly declared as deleted because ‘D1’ declares a move constructor or move assignment operator struct D1 : Base It's enough to remove one of the lines (any one) from D1 for the error to go away. Yet another variant: struct Base { Base() {} Base(const Base &) {} Base & operator=(Base &&) { return *this; } }; struct D1 : Base { using Base::operator=; }; struct D2 : D1 { D2 & operator=(const D2 &) { return *this; } }; int main() { D1 x; D1 y = x; (void) y; } The error is the same. The "operator=()" in "D2" doesn't have to be D2's assignment operator. It may some other "operator()", e.g., "operator(int)" or it may be "using D1::operator=;" or "using Base::operator=;"
[Bug c++/63540] Erroneous "'Derived' declares a move constructor or move assignment operator" in error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63540 Jonathan Wakely changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed||2014-10-15 Ever confirmed|0 |1
[Bug c++/63540] Erroneous "'Derived' declares a move constructor or move assignment operator" in error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63540 Paul Pluzhnikov changed: What|Removed |Added CC||ppluzhnikov at google dot com --- Comment #1 from Paul Pluzhnikov --- Google ref: b/17785687