A Map with Two Types of Keys in C++
The need to associate keys to values is pretty common in computer programming. (That is a very general sentence, isn’t it?) In C++, the standard tools to achieve that are std::map and std::multimap that use comparisons on keys and std::unordered_map and std::unordered_multimap that use hashing. Boost adds flat_map, that offers a different performance trade-off and bimap to look […]