| 167 | } |
| 168 | |
| 169 | bool update(const Key &key, const Value &value, |
| 170 | bool insert_if_missing = true) { |
| 171 | iterator it = find(key); |
| 172 | if (it != end()) { |
| 173 | it->second = value; |
| 174 | return true; |
| 175 | } else if (insert_if_missing) { |
| 176 | return insert(key, value).first; |
| 177 | } |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | // Move version of update |
| 182 | bool update(const Key &key, Value &&value, |