home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!bs
- From: bs@alice.att.com (Bjarne Stroustrup)
- Newsgroups: comp.lang.c++
- Subject: Re: forward declaration of a parameterized type?
- Message-ID: <24555@alice.att.com>
- Date: 5 Jan 93 13:42:25 GMT
- Article-I.D.: alice.24555
- References: <1993Jan5.034836.824@noose.ecn.purdue.edu>
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 17
-
-
-
-
- > How do you do a forward declaration of a parameterized type? This sort of
- > thing doesn't seem to work:
-
- > class LinkedList<foo>;
-
- template<class T> class LinkedList; // <<< this way
- // tells the compiler that LinkedList
- // is a template of one type argument
-
- > class foo{
- > public:
- > LinkedList<foo> *internal_foo_list;
- >
- > };
-