OSDN Git Service

2010-01-08 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / debug / unordered_set
index 4f27c3f..f704f01 100644 (file)
@@ -1,6 +1,6 @@
 // Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -115,9 +115,12 @@ namespace __debug
       unordered_set&
       operator=(unordered_set&& __x)
       {
-        // NB: DR 675.
-       clear();
-       swap(__x);
+       if (this != &__x)
+         {
+           // NB: DR 675.
+           clear();
+           swap(__x);
+         }
        return *this;
       }