title: How to find in map the pointer?
body: <p>I have two container std::map; 
  How to remove data from a container containing pointers to objects, knowing the pointer (address)?</p>
  
  <pre><code>std::map&lt;K, CacheEntry&lt;T&gt;&gt; values_;
  std::map&lt;CacheEntry&lt;T&gt;*, K&gt; timeMap_;
  </code></pre>
  
  <p>How i can find item in timeMap_? </p>
  
  <pre><code>CacheEntry&lt;T&gt; tmp(value);
  values_.insert(std::make_pair(key, tmp));
  timeMap_.insert(std::make_pair(&amp;tmp, key));
  deleteFromTimeMap(&amp;tmp);
  </code></pre>
  
  <p>And <strong>deleteFromTimeMap</strong>:</p>
  
  <pre><code>void deleteFromTimeMap(const CacheEntry&lt;T&gt;* findItem)
              {
                  details::LockGuard lk(mutex_);
                  auto it = timeMap_.find(findItem); //Error
                  timeMap_.erase(it);
              }
  </code></pre>