Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-28-2006
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
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
Reply With Quote
  #2 (permalink)  
Old 07-28-2006
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 813
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.
Reply With Quote
  #3 (permalink)  
Old 07-31-2006
dwayne's Avatar
dwayne 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: 209
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 09:42 AM.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
some problems with dll simpley Help Center 1 01-21-2005 04:18 AM
Hello example problems jpm Help Center 1 06-02-2003 04:26 PM


All times are GMT -4. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.