dual map structure implementation?

Posted by Danra on Stack Overflow See other posts from Stack Overflow or by Danra
Published on 2010-03-09T10:15:26Z Indexed on 2010/03/09 10:21 UTC
Read the original article Hit count: 314

Filed under:
|
|
|
|

Hey, I'm looking for a standard dual-map structure - is there one implemented in std/boost/another standard C++ library?

When I say "dual-map" I mean a map which can be indexed efficiently both by the key and the "value" (it actually has two key types instead of one key type and one value type).

for example:

dualmap<int,string> m;
m[1] = "foo";
m["bar"] = 2
int a = m["bar"]; // a = 2

Thanks, Dan

© Stack Overflow or respective owner

Related posts about boost

Related posts about map