This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51706] New: default copy assignment incorrectly deleted


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]