What is the best container suitable for the next task.
Fast movement of objects in any direction, the beginning / middle / end of the container on the principle of Z - indexing .
For example, the popup method opens so to speak, and this popup object should move to the end of the container for a while, after which it will have to be removed or simply moved 1 position down to overlap the content or display a message / warning / mistakes.
Such containers as map vector I think will not work at all, for one of the reasons, the vector or map will have to pull the entire collection to move or swap objects or move.
I looked at the list , but I think I also have my own pigs.
multi[set\map] looks good, but is not sure about its speed.
vector<unique_ptr<T>>. With high probability this is exactly what you need. And then test your performance. If your objects are small and the number of elements is less than a hundred, then the vector is likely to be the best solution - KoVadim