Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
After we've detected that we need to change the container in insert(), don't detach(). Instead, check if we're shared. If we're not shared, and we have sufficient capacity, do the change in-place. Otherwise, make a new container, copy the subset that forms the final result over, then assign the new container to *this.
See epic for more details.
Acceptance criteria: The following member functions no longer detach:
- append() (all overloads)
- emplace*() (all variants)
- insert() (all overloads)
- prepend() (all overloads)
- push_back()/push_front()