moved-from container with unequal allocator will not be modified:

Affects:
- flat_buffer
- multi_buffer
- http::fields

fixes #1832
closes #1834
This commit is contained in:
Richard Hodges committed 2020-02-04 18:36:53 +01:00
1 parent 6d10adf936
commit 7701bf8738
6 files changed
+9 -18

No files matched your search

@@ -124,8 +124,6 @@ basic_flat_buffer(
end_ = nullptr;
max_ = other.max_;
copy_from(other);
other.clear();
other.shrink_to_fit();
return;
}
@@ -436,8 +434,6 @@ move_assign(basic_flat_buffer& other, std::false_type)
if(this->get() != other.get())
{
copy_from(other);
other.clear();
other.shrink_to_fit();
}
else
{
@@ -502,8 +502,6 @@ basic_multi_buffer(
{
out_ = list_.end();
copy_from(other);
other.clear();
other.shrink_to_fit();
return;
}
@@ -1060,8 +1058,6 @@ move_assign(basic_multi_buffer& other, std::false_type)
if(this->get() != other.get())
{
copy_from(other);
other.clear();
other.shrink_to_fit();
}
else
{