Fix iterator version of basic_fields::erase

fix #994
This commit is contained in:
Peter Jankuliak
2018-01-25 06:02:43 -08:00
committed by Vinnie Falco
parent ad42096a9d
commit 4fb535ece6
3 changed files with 19 additions and 3 deletions
+3 -3
View File
@@ -609,11 +609,11 @@ basic_fields<Allocator>::
erase(const_iterator pos) ->
const_iterator
{
auto next = pos.iter();
auto next = pos;
auto& e = *next++;
set_.erase(e);
list_.erase(e);
delete_element(e);
list_.erase(pos);
delete_element(const_cast<value_type&>(e));
return next;
}