Use a boost::ptr_map to make code compile on old GCCs