I need a map-like container in which 1 value could be accessed by multiple keys(usually dozen), which could be dynamically added/removed.
Would such thing hurt performance? Am I better off just using map of pointers in which multiple pointers point to same object?
Think about this case:
3 keys: a, b, c and to each you assign a pointer that points to a dynamic variable. When I delete the value assigned to a (freeing the memory, because it's dynamically allocated), what would the assigned value for b and c point?
What your map-like container looks like is probably like this: for a value you can assign, not a single key, but a set of keys. By using this representation your performance won't be hurt because your search for a key will still take O(|K|), K being the actual key domain (a set of all keys that are being used at that moment).
You can use an ordinary map where your key is actually a set and override the equal and not equal operators to search for a key in the set.
Using an existing set from which you derive and add the functions you need will be the fastest way to go.
An unordered_map of keys to pointers seems to be the right solution. If you want object sharing, use shared_ptrs. Really, why complicate things?
If you use vectors or sets as keys, you won't be able to search on keys.
Multiindex container and databases are overkill. It would be slower, heavier and you wouldn't use most of the functionality.