Skip to main content

class dense_map

Declaration

template <typename KeyId, typename Value>
class dense_map { /* full declaration omitted */ };

Description

Like a simple std::unordered_map, but implemented by indexing into a vector with the integral key type.

Template Parameters

KeyId
Value

Member Aliases

  • using vector = std::vector<Value>;

Member Function Overview

Member Functions

dense_map()


explicit dense_map(size_t size)

Parameters

size_t size

template <typename InputIterator>
explicit dense_map(InputIterator begin,
                   InputIterator end)

Template Parameters

InputIterator

Parameters

InputIterator begin
InputIterator end

Value& operator[](KeyId key)

Parameters

KeyId key

const Value& operator[](KeyId key) const

Parameters

KeyId key