home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!spool.mu.edu!caen!uvaarpa!cv3.cv.nrao.edu!cv3!dschieb
- From: dschieb@muse.cv.nrao.edu (Darrell Schiebel)
- Subject: template constructor specialization (question)
- Message-ID: <DSCHIEB.93Jan5130012@muse.cv.nrao.edu>
- Sender: news@nrao.edu
- Organization: National Radio Astronomy Observatory
- Distribution: comp
- Date: Tue, 5 Jan 1993 18:00:12 GMT
- Lines: 18
-
-
- I have another question regarding templates, if I have the following
- templates:
-
- template<class t> id {
- id();}
- template<class t> class templ {};
-
- And now I want to write a specialized constructor for "id":
-
- template<class t> inline id<templ<t> >::id() {};
-
- What is the correct syntax for this?? I want a constructor which will be
- called for any instantiation of "templ".
-
-
- Thanks,
- Darrell Schiebel
-