Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / July 2004



Tip: Looking for answers? Try searching our database.

Weird template problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
raphael - 21 Jul 2004 10:56 GMT
Hi,

I'm using CW 8.3. I get an error from the
following snippet

template <typename T>
class A;

template <typename T>
class B
{
public:
    typedef A <T> A_;
   
    class D
    {
    public:
        A_ * foo ();
    };
};

template <typename T>
typename B <T> ::A_ * B <T> ::D::foo ()  // <- error here
{
}

/*identifier 'B::D::foo()' redeclared
was declared as: 'A<__T0> * ()'
now declared as: 'B<__T0>::A_ * ()'*/

This seems really strange to me.
- Is it normal from a language point of view ?
- Is it a CW 8.3 template parser problem ? (ISO and non-ISO checkbox
 give the same error)
- If so, is it corrected in CW 9 ?

If I'm wrong, please explain me my error or redirect me to
the relevant resource.

Many thanks,

Raf
MW Ron - 21 Jul 2004 15:02 GMT
>Hi,
>
[quoted text clipped - 34 lines]
>If I'm wrong, please explain me my error or redirect me to
>the relevant resource.

I think this is possibly an error in CodeWarrior.  I could duplicate
this with CW 9.2 and will submit it as a possible bug.

Ron

Signature

Metrowerks Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and Metrowerks' staff
       --   http://www.metrowerks.com/community  --

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com

raphael - 23 Jul 2004 09:35 GMT
Hi Ron,

> I think this is possibly an error in CodeWarrior.  I could duplicate
> this with CW 9.2 and will submit it as a possible bug.

Many thanks.
When do you think that you'll have some feedback from the dev team ?
(approximatively)

Thanks,

Raphael
MW Ron - 23 Jul 2004 20:16 GMT
>Hi Ron,
>
[quoted text clipped - 4 lines]
>When do you think that you'll have some feedback from the dev team ?
>(approximatively)

write me an e-mail and I'll check on it, I tend to forget and I'm on the
road.

I doubt this will be given a high priority.... You may need to get a one
off fix if the next patch comes out soon.

Ron

Signature

Metrowerks Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and Metrowerks' staff
       --   http://www.metrowerks.com/community  --

Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.