See chapter. I have a template. I want to force a specific template instance to instantiate. How to do it?
In particular, can you force an abstract template class to be created?
I could clarify, since I have the same question. In my case, I create a library, some of the template implementations are large and contain a lot of materials, but are created for only a few types. I want to compile them in the library and export all the methods, but not include the header with the code everywhere.
t
template<class T> OS_EXPORT_DECL class MyTmpl { T *item1; public: inline T *simpleGetT() { return(item1); } } T *doSomeReallyBigMergeStuff(T *b);
I could, of course, refer to all the methods inside the library that would force them to compile and export, but the desire not to add unnecessary code to the library, like formatting arguments for elements and code for calling them, etc.
????? In particular, I am creating a library for several versions of MSC and GCC and Intel compilers.
c ++ instantiation templates
anon Jan 28 '10 at 3:01 2010-01-28 03:01
source share