Priority queue and card
I am using LRU cache in my program. I have:
class DiadocCache : public IDiadocCache<K,T>
{
private:
std::map<K, CacheEntry<T>> values_;
std::priority_queue<?> timeQueue_;
}
priority - the number of calls to the key in my case.
I am putting elements on std :: map like this: values_.insert (std :: make_pair (key, CacheEntry (value)));
How can I add elements to priority_queue? What types should be specified when creating a priority queue? std :: priority_queue <? >
+3
source to share