Here is the code snippit from Gen_Map.h that I can't get to compile under MSVC6:
void insert(const Key& key, const Value& value) {
Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
entry_ptr = entry_ptr->m_next;
}
if (entry_ptr != 0) {
entry_ptr->m_value = value;
}
else {
Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
*bucket = new Entry(*bucket, key, value);
}
Error is:GEN_Map.h(109) : error C2678: binary '==' : no operator defined which takes a left-hand operand of type
'const class GEN_HashedPtr' (or there is no acceptable conversion)
I can't seem to find the problem.
Thanks in advance....Mike
It's probably a bug in MS compiler. Install Visual C++ sp4 and it will compile fine.
Benoit.