| 69 | // by this function. |
| 70 | template<typename ... Args> |
| 71 | T* EmplaceNew(const Key& key, Args&&... args) { |
| 72 | auto& p = cache_[next_slot_++ % kItemCapacity]; |
| 73 | p.second.emplace(std::forward<Args>(args)...); |
| 74 | p.first = key; |
| 75 | return &(*p.second); |
| 76 | } |
| 77 | |
| 78 | // Get the the cache instance for this thread, creating it if it has not yet been |
| 79 | // created. |