Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevector: destroy elements only via erase()
Fixes a bug in which pop_back did not call the deleted item's destructor. Using the most general erase() implementation to implement all the others prevents similar bugs because the coupling between deallocation and destructor invocation only needs to be maintained in one place. Also reduces duplication of complex memmove logic.
- Loading branch information