🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #593

Re: template default argument bug?

#593
From: MW Ron
Date: Fri, 06 Feb 2004 18:49
26 lines
1798 bytes
In article <4023cd0a$1@news.kos.net>,
 Edward Chew <ekc-noreply@lgl.kos.net> wrote:


>Ah well, so how about this one?  If I instantiate something along the lines:
>
>	TB<int,TA<int>> b;
>
>I get "Error: illegal template argument(s)".  This error vanishes if I 
>add one space like so:
>
>	TB<int,TA<int> > b;
>
>Is this a compiler bug or another quirk in C++ (again, I am using CW 8.3)?

A space is mandatory  because the shift operator  >> has higer 
precedence  so it would be parsed sooner.

this is a pretty frequent questions with peopld doing templates :)

Ron

-- 

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>
Technical Details
Message-ID: <mwron-5C8DDF.13492406022004@news.newsguy.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
References: <4022896d$1@news.kos.net> <hinnant-B84BAE.17430705022004@syrcnyrdrs-03-ge0.nyroc.rr.com> <4023cd0a$1@news.kos.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,7802dbc009c85cd
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,7802dbc009c85cd
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2004-02-06 11:20:04 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
From: MW Ron <mwron@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: template default argument bug?
Date: Fri, 06 Feb 2004 13:49:24 -0500
Organization: Metrowerks
Lines: 26
Message-ID: <mwron-5C8DDF.13492406022004@news.newsguy.com>
References: <4022896d$1@news.kos.net> <hinnant-B84BAE.17430705022004@syrcnyrdrs-03-ge0.nyroc.rr.com> <4023cd0a$1@news.kos.net>
NNTP-Posting-Host: p-785.newsdawg.com
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
        (%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
        @L/q,TjMd5+H{gASEPDR^$