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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!caen!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
  3. From: cflatter@nrao.edu (Chris Flatters)
  4. Subject: Re: where do templates go?
  5. Message-ID: <1992Nov9.174401.415@nrao.edu>
  6. Sender: news@nrao.edu
  7. Reply-To: cflatter@nrao.edu
  8. Organization: NRAO
  9. References: <DECHC00.92Nov9082600@tohi.DMI.USherb.Ca>
  10. Date: Mon, 9 Nov 1992 17:44:01 GMT
  11. Lines: 20
  12.  
  13. In article 92Nov9082600@tohi.DMI.USherb.Ca, dechc00@tohi.DMI.USherb.Ca (CHRISTIAN DECHAMPLAIN) writes:
  14. >
  15. >I'm using g++.  Suppose I'm using many compilation modules.  Where do the
  16. >templates go?  In the files with the declarations, in the files with the
  17. >definitions or just everywhere?  G++ does not seem to put them anywhere!
  18. >The ARM talks about a way to tell the compiler where you want them to be put,
  19. >where you want your templates to be expanded.  How do you do that with g++
  20. >specificaly.  I've searched for command line options and I've tried the
  21. >definition and implementation pragmas but with no success.  I've even once
  22. >managed to have some templates functions in my .o files but the linker still
  23. >complained that they weren't there.  Now I think that templates don't realy
  24. >work with g++ v2.3.1.
  25.  
  26. You have to put the template code in the header files.  The section of the ARM
  27. you are referring to is part of the commentary and not the language definition.
  28. I expect that CYGNUS will come up with better template handling features for
  29. g++ in the future.
  30.  
  31.     Chris Flatters
  32.     cflatter@nrao.edu
  33.