| 395 | |
| 396 | template <typename U, typename = typename std::enable_if<std::is_convertible<U, T>::value>::type> |
| 397 | void InsertWithHash(U&& element, size_t hash) { |
| 398 | DCHECK_EQ(hash, hashfn_(element)); |
| 399 | if (num_elements_ >= elements_until_expand_) { |
| 400 | Expand(); |
| 401 | DCHECK_LT(num_elements_, elements_until_expand_); |
| 402 | } |
| 403 | const size_t index = FirstAvailableSlot(IndexForHash(hash)); |
| 404 | data_[index] = std::forward<U>(element); |
| 405 | ++num_elements_; |
| 406 | } |
| 407 | |
| 408 | size_t Size() const { |
| 409 | return num_elements_; |
nothing calls this directly
no outgoing calls
no test coverage detected