Insertion
| 202 | |
| 203 | // Insertion |
| 204 | fl::pair<iterator, bool> insert(const value_type& value) { |
| 205 | auto it = lower_bound(value); |
| 206 | if (it != end() && !mLess(value, *it) && !mLess(*it, value)) { |
| 207 | return fl::pair<iterator, bool>(it, false); // Already exists |
| 208 | } |
| 209 | bool success = mData.insert(it, value); |
| 210 | if (success) { |
| 211 | // After insert, find the newly inserted element |
| 212 | it = find(value); |
| 213 | return fl::pair<iterator, bool>(it, true); |
| 214 | } |
| 215 | return fl::pair<iterator, bool>(end(), false); |
| 216 | } |
| 217 | |
| 218 | fl::pair<iterator, bool> insert(value_type&& value) { |
| 219 | auto key = value; |
nothing calls this directly
no test coverage detected