Gen_Map.h problem

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

mmwilde
Posts: 1
Joined: Mon Nov 04, 2002 5:24 am

Gen_Map.h problem

Postby mmwilde » Sat Nov 23, 2002 6:38 am

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

benoit
Posts: 5
Joined: Wed Oct 16, 2002 8:08 am
Location: Nice (France)

Postby benoit » Mon Nov 25, 2002 2:07 pm

It's probably a bug in MS compiler. Install Visual C++ sp4 and it will compile fine.

Benoit.


Return to “Coding Blender”

Who is online

Users browsing this forum: Google [Bot] and 2 guests