delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/14/18:15:59

From: alex DOT alexander AT adam DOT com DOT au
Date: Sat, 15 Jan 94 08:41:23 +1030
Subject: TEMPLATES
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Is it possible to define the body of a template class in
an object file, and the definition in the header, and then
the linker be able to link in various instances of that
template use in various other modules which have that header.
I currently only seem to be able to use templates where the
code is defined inline in the header.
In Borland C++ 3.1 it can be done with the use of pragmas
and typedefs, clumsy but it works.
Would appreciate a sample bit of code if it is possible.
Thankyou.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019