We need this overload because we want to optimize insertion when somebody inserts value_type. So we don't need to extract the key. This overload also allows brace enclosed initializer to be inserted.
| 330 | // So we don't need to extract the key. |
| 331 | // This overload also allows brace enclosed initializer to be inserted. |
| 332 | std::pair<iterator, bool> insert(const value_type& t) { |
| 333 | size_type hs = hasher{}(t.first); |
| 334 | auto p = GetBucketInfo(hs & BucketMask, t.first); |
| 335 | if (p.second) { |
| 336 | ++NumFilled; |
| 337 | if (NumFilled >= GrowThreshold) { |
| 338 | Grow(); |
| 339 | p.first = FindProperBucket(hs & BucketMask, t.first); |
| 340 | } |
| 341 | SetValue(p.first, t); |
| 342 | return { iterator{ this, p.first }, true }; |
| 343 | } |
| 344 | return { iterator{ this, p.first }, false }; |
| 345 | } |
| 346 | |
| 347 | // We need this overload because we want to optimize insertion when somebody inserts value_type. |
| 348 | // So we don't need to extract the key. |
no test coverage detected