开发者

C++ container for list and map

开发者 https://www.devze.com 2023-03-10 15:01 出处:网络
we have a collection of key and value pairs. We are in the need for a container which can help us to retrieve the value o(1) but also remember the insertion order so that when we do iteration, we coul

we have a collection of key and value pairs. We are in the need for a container which can help us to retrieve the value o(1) but also remember the insertion order so that when we do iteration, we could iterate like a inserting order. Since the key is a string, we will not able to use a set or similar structure.

Currently we have defined our own collection class which contains a list, also a map and the values are stored into 2 different structure.

Are there any readily available implementa开发者_开发知识库tion available?


Sounds like you need a Boost Multi-Index container.

0

精彩评论

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