I have an unordered_map below that I would like to save to disk. The problem is my unordered_map contain pointer to my custom class. Would you please show me an example how to accomplish this?
boost::unordered_map<char*,boost::variant<macro*,module*>,myhash,cmp_str> *_REF;
You need some kind of serialization mechanism for saving the contents of the map to the disk.
I would recommend looking at Boost Serialization library for this purpose:
http://www.boost.org/libs/serialization/
Hope this helps.