* Containers: allow move assignment to self It's used for instance when shuffling a std::vector of String * Remove unnecessary checks Co-authored-by: moneromooo <moneromooo> Co-authored-by: Eugene Kozlov <[email protected]>
@@ -273,7 +273,6 @@ public:
/// Move-assign a hash map.
HashMap& operator =(HashMap<T, U> && rhs) noexcept
{
- assert(&rhs != this);
Swap(rhs);
return *this;
}
@@ -230,7 +230,6 @@ public:
/// Move-assign a hash set.
HashSet& operator =(HashSet<T> && rhs) noexcept
@@ -219,7 +219,6 @@ public:
/// Move-assign from another list.
List& operator =(List<T> && rhs) noexcept
@@ -182,7 +182,6 @@ public:
/// Move-assign a string.
String& operator =(String && rhs) noexcept
@@ -122,7 +122,6 @@ public:
/// Move-assign from another vector.
Vector<T>& operator =(Vector<T> && rhs)