Archived

This forum has been archived. Please start a new discussion on GitHub.

Compiler error in Map.h

I've found a few bugs using Freeze in Ice-3.2.0 with Map.h
The first is located in Map::communicator() which attempts to return _communicator(), although Map::_communicator is an instance of Ice::CommunicatorPtr.
The compiler produces the error:
c:\Ice-3.2.0\include\Freeze/Map.h(1147) : error C2064: term does not evaluate to a function taking 0 arguments

The second is in bool Map::operator==(const Map& rhs) const where it checks if the sizes of the two maps being compared are equal using Map::count(). The compiler complains that count is declared:
size_type count(const key_type& key) const ;
while the operator== function calls:
if(count() != rhs.count())
which results in a compiler error:
c:\Ice-3.2.0\include\Freeze/Map.h(859) : error C2660: 'Freeze::Map<key_type,mapped_type,KeyCodec,ValueCodec,Compare>::count' : function does not take 0 arguments

The third is a problem in void Map::swap(Map& rhs). The function attempts to swap the value of Map::_communicator which is declared:
const Ice::CommunicatorPtr _communicator;
producing this error from the compiler:
c:\Ice-3.2.0\include\Freeze/Map.h(891) : error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const Ice::CommunicatorPtr' (or there is no acceptable conversion)

I've attached the full compiler output in 'VS.2005errors.txt' I've also attached a test project which can be used to duplicate the errors in freezetest.zip.

Lastly, I've created a patch which fixes the problems in VS.2005 in map_patch.txt

Comments

  • bernard
    bernard Jupiter, FL
    Hi Edwin,

    Thanks for the bug report and patch; we'll fix it in the next release.

    Bernard