Fix insert methods
insert_gap() method worked incorrectly. It used std::move_backward to move elements in a vector, ignoring the fact that memory after size() was uninitialized. This resulted in operator= being called on uninitialized elements instead of copy/move constructor. Fix this issue by reimplementing insert_gap as internal_insert. Use generic implementation for iterators to implement all cases.
parent
39758edb
Please register or sign in to comment