home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!convex!darwin.sura.net!sgiblab!sgigate!odin!sam.wpd.sgi.com!pj
- From: pj@sam.wpd.sgi.com (Paul Jackson)
- Subject: Re: templates within templates
- Message-ID: <1992Nov11.233355.8411@odin.corp.sgi.com>
- Sender: news@odin.corp.sgi.com (Net News)
- Nntp-Posting-Host: sam.wpd.sgi.com
- Reply-To: pj@sgi.com
- Organization: Silicon Graphics, Research & Development
- References: <ROSENBER.92Nov11235158@aton.abo.fi>
- Distribution: comp
- Date: Wed, 11 Nov 1992 23:33:55 GMT
- Lines: 22
-
- In article <ROSENBER.92Nov11235158@aton.abo.fi>, rosenber@aton.abo.fi (Robin Rosenberg INF) writes:
- |> I tried using templates like this:
- |>
- |> Ref<Node<T>> obj;
- |>
- |> I tried Borland C++ (3.0) and g++ (2.1) and neither accepts the syntax.
-
- Try changing it to:
-
- Ref<Node<T> > obj;
-
- with a blank between the two consecutive '>' signs,
- so that the parser doesn't get confused with the
- '>>' right shift operator.
-
- It works for me this way, using a cfront based compiler.
-
- --
-
- I won't rest till it's the best ...
- Software Production Engineer
- Paul Jackson (pj@sgi.com), x1373
-