home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!sbsvax!joker!stefan
- From: stefan@mpi-sb.mpg.de (Stefan Naeher)
- Newsgroups: comp.lang.c++
- Subject: A Template Question
- Message-ID: <23504@sbsvax.cs.uni-sb.de>
- Date: 22 Dec 92 11:39:58 GMT
- Sender: news@sbsvax.cs.uni-sb.de
- Reply-To: stefan@mpi-sb.mpg.de
- Organization: Max-Planck Institut fuer Informatik
- Lines: 30
-
-
- Is it allowed to use a template class name for a class member ?
- Cfront3.0.1 seems to handle this case not correctly.
-
- The following piece of code is compiled without any error message
-
- template <class T> class A { };
-
- struct B
- {
- int A;
-
- };
-
-
- however, if I change the type of B::A to int* cfront says
- "error: A needs template instantiation arguments".
-
- What is the correct behaviour?
-
-
- -------------------------------------------------------------------------------
- Stefan N"aher e-mail: stefan@mpi-sb.mpg.de
- Max-Planck-Institut f"ur Informatik phone: +49 681 302 5420
- Im Stadtwald fax: +49 681 302 5401
- 6600 Saarbr"ucken
- Germany
- -------------------------------------------------------------------------------
-
-
-