Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-08-2010
n2503v n2503v is offline
Registered User
 
Name: Alex Makarenko
Organization: ACFR, University of Sydney
Project: Orca
 
Join Date: Jun 2005
Posts: 121
template error in nested slice modules

Hi all,
while recompiling our C++ code with Ice-3.4 I came across a compile error in slice generated files.

Ice-3.4.0, C++, Linux, gcc-4.2/4.3/4.4

It seems that any 2 nested modules with contents on the both inner and outer levels will trigger this. Here's a simple example:

Code:
module m1
{
    struct S1
    {
        int var;
    };
       
    module m2
    {
        struct S2
        {
            int var;
        };
    };
};
the compiler error:

Quote:
In file included from nested.cpp:21:nested.h:242: error: specialization of ‘template<class T> struct Ice::StreamTrait’ in different namespace
/opt/Ice-3.4.0/include/Ice/Stream.h:56: error: from definition of ‘template<class T> struct Ice::StreamTrait’
Removing either S1 or S2 definition leads to a clean compilation.

Has anybody encountered a similar problem?

Cheers,
Alex
__________________
Alex Makarenko
Marathon Robotics
project: multi-robot systems
Reply With Quote
  #2 (permalink)  
Old 03-09-2010
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 1,202
Hi Alex,

Thanks for reporting this bug. It's too bad you didn't try this a few days ago, before we released 3.4.0.

I've posted a source patch here. You'll need to build a new version of slice2cpp.

Regards,
Mark
Reply With Quote
  #3 (permalink)  
Old 03-10-2010
n2503v n2503v is offline
Registered User
 
Name: Alex Makarenko
Organization: ACFR, University of Sydney
Project: Orca
 
Join Date: Jun 2005
Posts: 121
Doh! I should've tried to find some time to do it last week.

Your patch fixed it, thanks for that. The rest built without problems.

Thanks,
Alex
__________________
Alex Makarenko
Marathon Robotics
project: multi-robot systems
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
SLICE - Problems referencing classes in reopened modules. zrrbite Help Center 4 11-03-2009 03:16 AM
Nested Modules Ryuga Help Center 1 02-25-2009 05:18 AM
slice2html creates broken links for nested modules mefoster Bug Reports 1 05-01-2007 06:25 PM
slice2html 3.2.0 on nested modules yields dangling image links apope Bug Reports 1 04-02-2007 05:41 PM
docs: reference to other modules in slice n2503v Comments 2 11-20-2006 04:00 PM


All times are GMT -4. The time now is 12:44 PM.


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