As far as I can tell, the only thing those friend classes access is the
ValueSP typedef.
Given that this is a map-ish class, with "Map" in its name, it doesn't seem like
a stretch to make KeyType, ValueType and ValueSP public. More so when the
public methods of the class have KeyType and ValueSP arguments and clearly
ValueSP needs to be accessed from the outside.
friend complicates local reasoning about who can access private members, which
is valuable in a class like this that has every method locking a mutex to
prevent concurrent access.