I have a question on how pointers to a custom object are handled when used as Keys in an map. More specifically if I define
std::map< CustomClass*, int &
Leaving aside from the legality of this and any possible semantic misunderstandings, addressed already, I cannot think of any reason to use std::map here rather than std::unordered_map. There are early intercepts of this in Boost and Visual C++ if you are on a pre-C++11 compiler.
Since you appear to be using a pointer to represent a unique object, something like boost::flyweight could be applicable.