Insertion
| 249 | |
| 250 | // Insertion |
| 251 | fl::pair<iterator, bool> insert(const value_type& value) FL_NOEXCEPT { |
| 252 | auto it = lower_bound(value.first); |
| 253 | if (it != end() && !mLess(value.first, it->first) && !mLess(it->first, value.first)) { |
| 254 | return fl::pair<iterator, bool>(it, false); // Already exists |
| 255 | } |
| 256 | bool success = mData.insert(it, value); |
| 257 | if (success) { |
| 258 | // After insert, find the newly inserted element |
| 259 | it = find(value.first); |
| 260 | return fl::pair<iterator, bool>(it, true); |
| 261 | } |
| 262 | return fl::pair<iterator, bool>(end(), false); |
| 263 | } |
| 264 | |
| 265 | fl::pair<iterator, bool> insert(value_type&& value) FL_NOEXCEPT { |
| 266 | auto key = value.first; |
no test coverage detected