std::vector and stdext::hash_map

M

Mike Lischke

Hi group,

Does anybody of you know a template that unites a vector and a hash map?
What I'm after is a hash map that can also be accessed by index. I know
that an associative container is not laid out like a vector but I could
imagine something like double references. That is, first a normal hash map
and second a vector for indexed access that references entries in the hash
map.

Any hint?

Mike
 
J

Jeff Flinn

Mike said:
Hi group,

Does anybody of you know a template that unites a vector and a hash
map? What I'm after is a hash map that can also be accessed by index.
I know that an associative container is not laid out like a vector
but I could imagine something like double references. That is, first
a normal hash map and second a vector for indexed access that
references entries in the hash map.

See http://www.boost.org/libs/multi_index/doc/index.html. The current
version provides std::map access complexities. Hashed indexes are in the
works.

Jeff Flinn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,293
Messages
2,571,500
Members
48,188
Latest member
GerardRush

Latest Threads

Top