In the following code:
typedef bimap< set_of< std::string >, list_of< int > > bm_type;
bm_type bm;
bm.left["one"] = 1; // "one" -> 1
bm.left["one"] = 2; // replaced: "one" -> 2
bm.right[2] = "two"; // Compile error
How can I get rid of the compile error? Isn't it possible to access the right view with operator[]
?