formatting

This commit is contained in:
Jidong Xiao
2023-10-20 10:45:08 -04:00
parent 894df9ff7f
commit 8e5b08b680

View File

@@ -147,8 +147,10 @@ m.insert(std::make_pair(key, value));
insert returns a pair, but not the pair we might expect. Instead it is pair of a map iterator and a bool:
std::pair<map<key_type, value_type>::iterator, bool>
- The insert function checks to see if the key being inserted is already in the map.
If so, it does not change the value, and returns a (new) pair containing an iterator referring to the existing
pair in the map and the bool value false.
pair in the map and the bool value false.
If not, it enters the pair in the map, and returns a (new) pair containing an iterator referring to the newly
added pair in the map and the bool value true.