OSDN Git Service

2010-01-08 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / debug / map.h
index 9a558b5..8ef28a1 100644 (file)
@@ -115,9 +115,12 @@ namespace __debug
       map&
       operator=(map&& __x)
       {
-        // NB: DR 675.
-       clear();
-       swap(__x);
+       if (this != &__x)
+         {
+           // NB: DR 675.
+           clear();
+           swap(__x);
+         }
        return *this;
       }