// List implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 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
list&
operator=(list&& __x)
{
- // NB: DR 675.
- this->clear();
- this->swap(__x);
+ if (this != &__x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ }
return *this;
}