Results 1 to 3 of 3

Thread: problems with VC8.0

  1. #1
    stephan is offline Registered User
    Name: Stephan Stapel
    Organization: Stephan Stapel
    Project: BristolNG
    Join Date
    Oct 2003
    Location
    Essen, Germany
    Posts
    172

    problems with VC8.0

    Hi!

    I don't know exactly if this case matches to the bug that was fixed with one of the patches, thus I'd like to post the trouble code here. If I try to compile the slice2cpp-ed code of this module:

    Code:
    module TestModule
    {
    	dictionary<string, Ice::ByteSeq> FileMap;
    	
    	interface TestInterface
    	{
    		FileMap returnMyMap();
    	};
    };
    I receive error messages on this result code:

    Code:
    void
    TestModule::__read(::IceInternal::BasicStream* __is, ::TestModule::FileMap& v, ::TestModule::__U__FileMap)
    {
        ::Ice::Int sz;
        __is->readSize(sz);
        while(sz--)
        {
    	::std::pair<const  ::std::string, ::Ice::ByteSeq> pair;
    	__is->read(const_cast< ::std::string&>(pair.first));
    	::TestModule::FileMap::iterator __i = v.insert(v.end(), pair);
    	::std::pair<const ::Ice::Byte*, const ::Ice::Byte*> _____i->second;
    	__is->read(_____i->second);
    	::std::vector< ::Ice::Byte>(_____i->second.first, _____i->second.second).swap(__i->second);
        }
    }

    Code:
    .\test.cpp(112) : error C2143: syntax error : missing ';' before '->'
    .\test.cpp(113) : error C2819: type 'std::pair<_Ty1,_Ty2>' does not have an overloaded member 'operator ->'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
            did you intend to use '.' instead?
    .\test.cpp(113) : error C2232: '->std::pair<_Ty1,_Ty2>::second' : left operand has 'struct' type, use '.'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
    .\test.cpp(114) : error C2819: type 'std::pair<_Ty1,_Ty2>' does not have an overloaded member 'operator ->'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
            did you intend to use '.' instead?
    .\test.cpp(114) : error C2232: '->std::pair<_Ty1,_Ty2>::second' : left operand has 'struct' type, use '.'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
    .\test.cpp(114) : error C2228: left of '.first' must have class/struct/union
    .\test.cpp(114) : error C2819: type 'std::pair<_Ty1,_Ty2>' does not have an overloaded member 'operator ->'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
            did you intend to use '.' instead?
    .\test.cpp(114) : error C2232: '->std::pair<_Ty1,_Ty2>::second' : left operand has 'struct' type, use '.'
            with
            [
                _Ty1=const Ice::Byte *,
                _Ty2=const Ice::Byte *
            ]
    .\test.cpp(114) : error C2228: left of '.second' must have class/struct/union
    .\test.cpp(114) : error C2228: left of '.swap' must have class/struct/union
    Did I do something wrong or has the slice compiler cause this problem?

    regs,

    Stephan
    Stephan Stapel
    Software Architect
    Author of 'Verteilte Internet-Anwendungen mit Ice', ix 07/2005
    Author of 'Webbasierte Anwendungen mit IcePHP', ix, 06/2006

  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 Stephan,

    Thanks for the bug report; it is not fixed by one of the existing 3.1.0 patches.

    It's a bug in the code generated for dictionaries where the value is a byte sequence (the interface has nothing to do with it).

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Hi,

    I have posted a patch for this problem here.

    Thanks again for the bug report.

    Regards,
    Dwayne
    Last edited by dwayne; 07-31-2006 at 08:42 AM.
    Dwayne Boone

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HelloWorld: Problems with C++
    By JAX82 in forum Help Center
    Replies: 6
    Last Post: 09-07-2011, 09:16 AM
  2. VC8.0 is supported?
    By OrNot in forum Help Center
    Replies: 1
    Last Post: 03-08-2010, 02:35 AM
  3. problems preverifying
    By cesartovic in forum Help Center
    Replies: 1
    Last Post: 06-22-2006, 07:50 PM
  4. Pointer problems
    By Nis Baggesen in forum Help Center
    Replies: 2
    Last Post: 06-06-2005, 03:44 AM
  5. Hello example problems
    By jpm in forum Help Center
    Replies: 1
    Last Post: 06-02-2003, 03:26 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
  •