From a939bfc66fa3cb989b885e964c27d2bad49def0a Mon Sep 17 00:00:00 2001 From: hugogogo Date: Fri, 17 Jun 2022 10:46:21 +0200 Subject: [PATCH] solved pbm in vector reserve --- templates/vector.tpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/vector.tpp b/templates/vector.tpp index ef64107..ff6cabb 100644 --- a/templates/vector.tpp +++ b/templates/vector.tpp @@ -158,7 +158,7 @@ VT_TPL void VT:: tmp_ptr = _allocator.allocate(new_cap); _mem_ptr = tmp_ptr; - if (_mem_ptr) + if (old_ptr) { _size = 0; assign(first, last);