The current definition of ResourceHashTableBase::get is const, but returns V*, i.e. a mutable pointer to one of the values it stores.
This means that, even for a const ResourceHashTable(Base), the elements can be modified through the mutable pointer returned by get.
Suggested fix is to make the current get implementation non-const, and then add a const overload that returns a const V* instead.
A mutable reference to the elements can also be leaked through one of the variants of the 'iterate' function. This function is also marked const, but passes mutable references to the keys and values to a callback.
This means that, even for a const ResourceHashTable(Base), the elements can be modified through the mutable pointer returned by get.
Suggested fix is to make the current get implementation non-const, and then add a const overload that returns a const V* instead.
A mutable reference to the elements can also be leaked through one of the variants of the 'iterate' function. This function is also marked const, but passes mutable references to the keys and values to a callback.