[LC++]template and gcc
Vincent Penquerc'h
Vincent.Penquerch at artworks.co.uk
Mon Mar 25 22:02:05 UTC 2002
> class Dummy: public run<int> {} dummy;
You can also simply instantiate your template in an object file,
to tell the compiler that you do use it, so it can generate the
right code:
#include "run.h"
template class Running<int>;
This is as when you do:
void foo(void);
to tell the compiler there is something that's called foo,
except that the compiler will instanciate the template (generate
code for it templated for int).
--
Vincent Penquerc'h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/tuxcpprogramming/attachments/20020325/1cdeb6ce/attachment.htm
More information about the tuxCPProgramming
mailing list