I may need to rethink my overall design a bit more, but as it stands, it looks like I may want to do something like:
class A;
class B;
std::map<boost::shared_ptr<const A>, B> APtrToBMap;
I've tried this, and it does seem to work in a simple case (the compiler didn't complain, and simple tests seem to work). But I'm having second thoughts about this approach. I suspect there are some gotchas in there that I'm not aware of.
So, is the above valid in a practical sense? Or is there some flaw I'm not aware of when I do this?