R
rippley.scott
Hi,
I am looking for a container mapping a key value1 to another key
value2. I want to use value1 to lookup value2 in the container. But I
also want to use value2 to find value1 in the container. A
(simplified) example: I have pairs of return codes (int) and return
messages (string). Having the return code I want to find the
respective message. But (and I really need this) sometimes I have the
return message and want to find the respective return code.
I imagined using some kind of bijective container for that, but I did
not find one. I am surprised of this, because I thought this might be
a standard STL container. Did I just oversee it or is there realy no
bijective container in the STL? If not in STL, does someone know any
library providing such a container?
Thx
Alex
I am looking for a container mapping a key value1 to another key
value2. I want to use value1 to lookup value2 in the container. But I
also want to use value2 to find value1 in the container. A
(simplified) example: I have pairs of return codes (int) and return
messages (string). Having the return code I want to find the
respective message. But (and I really need this) sometimes I have the
return message and want to find the respective return code.
I imagined using some kind of bijective container for that, but I did
not find one. I am surprised of this, because I thought this might be
a standard STL container. Did I just oversee it or is there realy no
bijective container in the STL? If not in STL, does someone know any
library providing such a container?
Thx
Alex