This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51706] New: default copy assignment incorrectly deleted
- From: "b.r.longbons at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Dec 2011 22:16:38 +0000
- Subject: [Bug c++/51706] New: default copy assignment incorrectly deleted
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51706
Bug #: 51706
Summary: default copy assignment incorrectly deleted
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: b.r.longbons@gmail.com
Created attachment 26200
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26200
minimal testcase
If a move constructor is defined, then the copy assignment operator is deleted,
even if a copy constructor is defined.
In the n3092 draft, it is:
12.8 "Copying and moving class objects" [class.copy], paragraphs 20,25
which doesn't say move constructors should affect copy assignment.
(Background: I used "= default" on my copy and move constructors to work around
a bug in GCC 4.6)
testcase also at http://ideone.com/U1nvV