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