Results 1 to 2 of 2

Thread: Compiler error in Map.h

  1. #1
    Edwin Rodriguez is offline Registered User
    Name: Edwin Rodriguez
    Organization: Bright Systems, Inc.
    Project: DDR
    Join Date
    Mar 2007
    Posts
    3

    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:perator==(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,ValueCo dec,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
    Attached Files Attached Files

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Edwin,

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

    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. about ICE-E's demo compiler error
    By leo in forum Help Center
    Replies: 4
    Last Post: 08-06-2008, 04:40 AM
  2. Visual Studio Express 2005 C++ compiler error
    By blonder in forum Help Center
    Replies: 6
    Last Post: 05-22-2007, 10:04 AM
  3. csc compiler error amd inherit accross namespaces
    By DeepDiver in forum Bug Reports
    Replies: 2
    Last Post: 12-01-2004, 09:42 PM
  4. Microsoft VC compiler error
    By aroan in forum Help Center
    Replies: 3
    Last Post: 12-01-2004, 05:13 PM
  5. compiler error
    By code in forum Help Center
    Replies: 1
    Last Post: 11-27-2004, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •