Subject: STL alloc and templates
From: [email-masked] (John F. Kolen)

17 Dec 1996 08:00:49 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail)
Original-To: [email-masked]
Original-Sender: [email-masked]

/*I'm not sure if this is the place to post this, but here goes.*/

I tried using the list data structure from the c++ STL.  It works fine
if used in a single source file.  However, if I try to have two
source files using list (or anything else that uses the default alloc) I
get data and function definitions appearing in both object files due to
template expansions.  The culprit is alloc.h which does things along the lines
of:

template <class T> default_alloc<T>::count=0;

Since there are no #pragma interface lines to be found in alloc.h, I assume
there is a set of command line incantations to compile multi-source files
relying on STL and alloc.h.

Thanks in advance for any hints, pointers, or solutions.

--
John F. Kolen				voice: (904)474-3075
Assistant Professor			fax:   (904)474-3023
Dept. of Computer Science
University of West Florida
Pensacola, FL 32514
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".