| 797 | // Note: any initial contents of the key_container are not cleared. |
| 798 | template <class MapContainer, class KeyContainer> |
| 799 | void InsertKeysFromMap(const MapContainer& map_container, |
| 800 | KeyContainer* key_container) { |
| 801 | CHECK(key_container != NULL); |
| 802 | for (typename MapContainer::const_iterator it = map_container.begin(); |
| 803 | it != map_container.end(); ++it) { |
| 804 | key_container->insert(it->first); |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | // Appends all the keys from map_container into key_container, which must |
| 809 | // support push_back(MapContainer::key_type). |