Thank you all for replying to my question and writing about "export"
keyword. I'm not sure I can completely understand this template
instantiation issue and "export", but this keyword does not seem to
enable to do separate compilation.
I've realized that C++ templates require more intelligence from the
programming environment than one finds on a usual system. Somehow the
compiler and linker have to make sure that each template instance
occurs exactly once in the executable. But it is so difficult that
one sometimes has trouble in using automatic instantiation which
seriously depends on the compiler.
I think that explicit instantiation is a good idea to make sure
exactly one template instance in the executable. But you cannot know
what kind of expression template object is to be instantiated in the
executable, so that the method cannot deal with expression templates.
After all, I think I'd better continue to put both template
declarations and implementations into header files. ( I wish
I might get a smarter IDE which help me out of this mess. )
Masakatsu Ito
Computer Center of Institute for Molecular Science
E-mail mito@ims.ac.jp
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:15 EST