Basically I need to be able to use operations like push_back() + random access a list like std::vector is able to do, while also keeping its pointer validity, like std::list does. Is this possible?
I was working with pointers pointing to various elements inside the list, and while std::vector provides random access to elements, everything invalidates upon push_back().
Perhaps you have heard of a data structure like a hash-linked list? This data structure is an extension of the linked list, which maintains an additional array on top of the normal linked list, the number of elements of this array is the same as the number of elements of the linked list, except that its elements are pointers to the corresponding linked list elements. The advantage of this data structure is that it allows for random access and makes use of fragmented memory. But this seems to be some deviation from your problem description? I'm not sure if this would meet your needs..
Code just like this(I'm very sorry, I had very little time to write the answer so I didn't really compile and run it, maybe the code is still buggy, hahaha):
Hope it can help you.