forked from boostorg/container
Fix multiple destructor bug, pointer was not incremented in ~scoped_destructor_n()
This commit is contained in:
1 parent
44d326e159
commit
be9837fd54
1 file changed
+1
-1
@@ -204,7 +204,7 @@ struct scoped_destructor_n
|
||||
if(!m_p) return;
|
||||
value_type *raw_ptr = container_detail::to_raw_pointer(m_p);
|
||||
while(m_n--){
|
||||
AllocTraits::destroy(m_a, raw_ptr);
|
||||
AllocTraits::destroy(m_a, raw_ptr++);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user