79671140

Date: 2025-06-18 18:08:44
Score: 0.5
Natty:
Report link

You could do this with boost::bimap from the boost library. Eg.

    boost::bimap<int, std::string> map;
    map.insert({1, "one"});
    map.insert({2, "two"});

    std::cout << map.left.at(1) << "\n";  // "one"
    std::cout << map.right.at("two") << "\n";  // 2
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Cameron