The implementation of a dual card?

I am looking for a standard structure with two maps - is there one implemented in std / boost / another standard C ++ library?

When I say “double map”, I mean a map that can be effectively indexed with both a key and a “value” (in fact, it has two types of keys, not one type of key and one type of value).

eg:

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

Thanks Dan

+3
source share
2 answers

There, increase the bimap if you do not want all horsepower to increase the multi-index.

+12
source

Source: https://habr.com/ru/post/1736085/


All Articles