10 #ifndef META_SPLAY_CACHE_H_
11 #define META_SPLAY_CACHE_H_
28 template <
class Key,
class Value>
39 splay_cache(uint64_t max_size = std::numeric_limits<uint64_t>::max());
63 void insert(
const Key& key,
const Value& value);
75 uint64_t
size()
const;
109 node(
const Key& new_key,
const Value& new_value)
110 : left(nullptr), right(nullptr), key(new_key), value(new_value)
138 void insert(
node*& subroot,
const Key& key,
const Value& value);
148 void replace(
node* subroot,
const Key& key,
const Value& value);
159 void find(
node*& subroot,
const Key& key);
180 using std::runtime_error::runtime_error;