开发者

C++: multiple keyed map

I am searching for a (multi)map where there values are associated by different key types. Basically what was asked here for Java but for C++. Is there something like this already or do I have to implement it myself?


Another, more simple case (the above case would solve this already but there may be a more simple solution esp for this case):

I want a multimap where my values are all unique and ordered (the keys are also ordered of course) and I want to be able to do a search in the map for a specific value in O(log n) time. So I can get the associated key to a value in O(log n) time. And I can get the associated v开发者_高级运维alue to a key also in O(log n) time.


If you want to be able to search both by key and by value use boost.bimap.

If you need multiple keys use boost.multi-index.


Boost Multi-Index.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜