home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18713 < prev    next >
Encoding:
Text File  |  1993-01-05  |  813 b   |  30 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!spool.mu.edu!caen!uvaarpa!cv3.cv.nrao.edu!cv3!dschieb
  3. From: dschieb@muse.cv.nrao.edu (Darrell Schiebel)
  4. Subject: template constructor specialization (question)
  5. Message-ID: <DSCHIEB.93Jan5130012@muse.cv.nrao.edu>
  6. Sender: news@nrao.edu
  7. Organization: National Radio Astronomy Observatory
  8. Distribution: comp
  9. Date: Tue, 5 Jan 1993 18:00:12 GMT
  10. Lines: 18
  11.  
  12.  
  13. I have another question regarding templates, if I have the following 
  14. templates:
  15.  
  16.     template<class t> id {
  17.       id();}
  18.     template<class t> class templ {};
  19.  
  20. And now I want to write a specialized constructor for "id":
  21.  
  22.     template<class t> inline id<templ<t> >::id() {};
  23.  
  24. What is the correct syntax for this?? I want a constructor which will be
  25. called for any instantiation of "templ".
  26.  
  27.  
  28.                         Thanks,
  29.                         Darrell Schiebel
  30.