How to Check If an Inserted Object Was Already in a Map (with Expressive Code)
▻https://www.fluentcpp.com/2019/09/27/how-to-check-if-an-inserted-object-was-already-in-a-map-with-expressive-c
To insert a new entry into an STL set or map, or any of their multi- and unordered- equivalents, we use the insert method: [crayon-5d8d64c376c66226625614/] insert performs the action of inserting the new entry into the container, if that entry wasn’t there already. But insert doesn’t only perform that action: it also returns two pieces of information about […]