Преглед на файлове

fix: minus size after erasing element

greatbridf преди 3 години
родител
ревизия
cfba937af6
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      include/types/list.hpp

+ 1 - 0
include/types/list.hpp

@@ -216,6 +216,7 @@ public:
         node_base_type* current_node = iter._node();
         current_node->prev->connect(current_node->next);
         allocator_traits<allocator_type>::deallocate(static_cast<node_type*>(current_node));
+        --_size();
     }
 
     // insert the value v in front of the given iterator