"Why are you comparing C++ map to the TBB hash_map when C++ also has a hash_map?"
Not officially yet, but it does seem widely supported, so my answer turned out to be somewhat pedantic, sorry.
"As far as I know C++ hash_map can be kept sorted or at least I have managed to do it with Microsoft implementation when I was experimenting with it. Perhaps that was an error or a pure luck?"
If this is not luck (a 17% chance with 3 entries), it still seems suboptimal and probably
nonportable.
Intuitively I would presume that a locked std::map is up to the task of tracking file system directory events as well as user events, so I would start with that and then see/profile what happens, unless someone has a better idea.