OSDN Git Service

2010-01-08 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / profile / unordered_set
index b350da0..8c9e766 100644 (file)
@@ -129,9 +129,12 @@ namespace __profile
       unordered_set&
       operator=(unordered_set&& __x)
       {
-        // NB: DR 675.
-       this->clear();
-       this->swap(__x);
+       if (this != &__x)
+         {
+           // NB: DR 675.
+           this->clear();
+           this->swap(__x);
+         }
        return *this;
       }
 
@@ -343,9 +346,12 @@ namespace __profile
       unordered_multiset&
       operator=(unordered_multiset&& __x)
       {
-        // NB: DR 675.
-       this->clear();
-       this->swap(__x);
+       if (this != &__x)
+         {
+           // NB: DR 675.
+           this->clear();
+           this->swap(__x);
+         }
        return *this;
       }