home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 12946 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.0 KB  |  50 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!cs.utexas.edu!lgc.com!srinivas
  3. From: srinivas@lgc.com (Manapragada Srinivas)
  4. Subject: Ellipsis in template constructors
  5. Message-ID: <1992Aug27.041723.3908@lgc.com>
  6. Followup-To: gnu.g++.bug
  7. Sender: usenet@lgc.com
  8. Nntp-Posting-Host: squirt.lgc.com
  9. Organization: Landmark Graphics Corporation
  10. Date: Thu, 27 Aug 1992 04:17:23 GMT
  11. Lines: 37
  12.  
  13.  
  14. Hi,
  15.  
  16.     I am trying to use ellipsis in my template constructors. The problem
  17.     is that g++2.2.2 gives a syntax error for the followin piece of code
  18.  
  19.  
  20.         template<class T>
  21.         Vector<T>::Vector( int size ... )
  22.         {
  23.             // Other stuff
  24.         }
  25.  
  26.     I have also tried 
  27.  
  28.         template<class T>
  29.         Vector<T>::Vector( int size, ... )
  30.         {
  31.             // Other stuff
  32.         }
  33.  
  34.     g++ gives the following error
  35.  
  36.         Vector.icc: In method `Vector<float>::Vector (int, ...)':
  37.         Vector.icc:48: parse error before `)'
  38.  
  39.  
  40.     Is this a bug in g++2.2.2 or ellipsis not allowed in constructors?
  41.  
  42.  
  43.     I would appreciate any help in this matter.
  44.  
  45. Thanks in advance,
  46.  
  47. Srinivas
  48. --
  49. Yonder, beyond the event horizon!
  50.