Subject: c++ templates
To: None <netbsd-help@netbsd.org>
From: Patrick Welche <prlw1@cam.ac.uk>
List: netbsd-help
Date: 09/18/1998 16:14:39
Trying out
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
as per -current, I am trying to use a template:
export template <class monadType>
void stamp(monadType& a)
{
...
and get
syntax error before `template'
presumably from the "export". I am new to the c++ game, but thought I
had to "export" a template so that it may be instantiated in another
.cc text file. Is this not implemented in egcs (ie., I have to put the
code for the template in a header file) or am I missing something?
Cheers,
Patrick