I want to create a set associative structure similar to cache (http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/set.html). There are some sets and each set contains some ways. Each way has some fields however all of the ways in a set has unique field (tag).
I see std::multiset which can be used for my purpose. Is there any other choice? any thought?
For caches I usually use std::map, std::multimap or their hash equivelents. In fact hash_map usually performs a bit better so probably it is the better choice here. In c++11 hash_map is called unordered_map and is now part of the standard so I advice you to use this one. It also has a multi- version called unordered_multimap. If c++11 is not an option same containers can be found in boost.