mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Fix multiple destructor bug, pointer was not incremented in ~scoped_destructor_n()
This commit is contained in:
@@ -204,7 +204,7 @@ struct scoped_destructor_n
|
|||||||
if(!m_p) return;
|
if(!m_p) return;
|
||||||
value_type *raw_ptr = container_detail::to_raw_pointer(m_p);
|
value_type *raw_ptr = container_detail::to_raw_pointer(m_p);
|
||||||
while(m_n--){
|
while(m_n--){
|
||||||
AllocTraits::destroy(m_a, raw_ptr);
|
AllocTraits::destroy(m_a, raw_ptr++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user