home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16121 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!convex!darwin.sura.net!sgiblab!sgigate!odin!sam.wpd.sgi.com!pj
  3. From: pj@sam.wpd.sgi.com (Paul Jackson)
  4. Subject: Re: templates within templates
  5. Message-ID: <1992Nov11.233355.8411@odin.corp.sgi.com>
  6. Sender: news@odin.corp.sgi.com (Net News)
  7. Nntp-Posting-Host: sam.wpd.sgi.com
  8. Reply-To: pj@sgi.com
  9. Organization: Silicon Graphics, Research & Development
  10. References:  <ROSENBER.92Nov11235158@aton.abo.fi>
  11. Distribution: comp
  12. Date: Wed, 11 Nov 1992 23:33:55 GMT
  13. Lines: 22
  14.  
  15. In article <ROSENBER.92Nov11235158@aton.abo.fi>, rosenber@aton.abo.fi (Robin Rosenberg INF) writes:
  16. |> I tried using templates like this:
  17. |> 
  18. |>     Ref<Node<T>> obj;
  19. |> 
  20. |> I tried Borland C++ (3.0) and g++ (2.1) and neither accepts the syntax.
  21.  
  22. Try changing it to:
  23.  
  24.     Ref<Node<T> > obj;
  25.  
  26. with a blank between the two consecutive '>' signs,
  27. so that the parser doesn't get confused with the
  28. '>>' right shift operator.
  29.  
  30. It works for me this way, using a cfront based compiler.
  31.  
  32. -- 
  33.  
  34.                 I won't rest till it's the best ...
  35.                 Software Production Engineer
  36.                 Paul Jackson (pj@sgi.com), x1373
  37.