I have:
- class X
- boost::unordered_map of X
List of X - used to timeout element according to timestamp
I need to insert and remove element from list with performance. I though using intrusive list, so an element can remove itself from the list without going through all the list.
- I want to wrap X with shared_ptr so it won't leak...
I discovered that shared_ptr is not compatible with intruive ptr.
1. Do you have another proposition?
Using multi_index of shared_ptr with 2 indexes(hashed and ordered) could be the best solution, but i can't use it.
2.Is oredered index in multi index efficient for removing element?