In addition to the sibling’s comment on explicitly passing inna comparator, note that std::map is an ordered dictionary and requires an ordering on your elements. It sounds like you may have preferred hash_map
I'll keep hash_map in mind though, and maybe do some performance testing to see which is actually faster.
Note: when I say "incredibly slow", it is relative to what is possible to achieve in C++ - it will still roll over many other languages's map implementations.
[1] - https://chromium.googlesource.com/chromium/src/+/master/base...