http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57049



             Bug #: 57049

           Summary: std::swap does self move assignment, which is illegal

    Classification: Unclassified

           Product: gcc

           Version: 4.7.1

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: libstdc++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: tud...@fb.com





Created attachment 29922

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29922

sample program that illustrates incorrect behavior



The default implementation of std::swap does self-move-assignment when calling

swap(a, a), which is illegal according to 17.6.4.9.

Reply via email to