typedef std::map<my_key, my_list::iterator> my_map; typedef std::list<std::pair<my_val, my_map::iterator> > my_list;