c++: use std::map in simple_huffman_encoder