16 using value_type = std::pair<KeyT, ValueT>;
17 using reference = value_type&;
18 using size_type = std::size_t;
26 std::list<value_type> entries;
31 using iterator =
typename std::list<value_type>::iterator;
32 using const_iterator =
typename std::list<value_type>::const_iterator;
34 void emplace(
const KeyT& key,
const ValueT&
value) {
35 auto iter = entries.insert(entries.end(), std::make_pair(key,
value));
40 return entries.size();
43 bool empty()
const noexcept {
44 return entries.empty();
47 ValueT& operator[](
const KeyT& key) {
48 return *index.lookup(key);
51 const ValueT& operator[](
const KeyT& key)
const {
52 return *index.lookup(key);
55 const_iterator cbegin()
const {
56 return entries.cbegin();
59 const_iterator cend()
const {
60 return entries.cend();