I am unable to decide which STL container to use in the following case:
You could do this:
Create a wrapper around your element class with two members: your element, and an index. Let's call it 'InsertedElement'. The index will be the insertion order.
Define comparison operator for this class, which only takes into account your element, but not the index. This will ensure the uniqueness of elements, while remembering their insertion order.
Wrap a std::set and an insertion counter in another class. Then, when you want to insert a new element, either:
Something like:
class CMagicContainer
{
public:
std::set collection;
int indexGenerator;
...
};