Show differencesHistory of post edits
Posted 28 May 2012 - 02:21 PM
Thanks a lot. Template instantiation is what I wanted !!
Posted 28 May 2012 - 02:10 PM
Thanks for your update.
Your right. And the hack above does not work anyway. I tried to integrate this stuff.
Lots of problems occur in the concrete.cpp if one class reference another class. (class redefinition errors as expected)
The thing is if we made concrete function definition for each template class, it would turn out to be a headache, and I would
prefer not to include it in the header file (for compilation time issues).
Thats why I tried to do the above.
My understanding of template classes, is that the compiler keeps compiling it everytime they occur in code and given that each include to the template class includes the whole source code, compilation times ought to be less. Am I right ? Does the
explicit template instantiation reduce that time ?
How about we make a macro with the function definition and use it like that ?
#define DEF_TEMPLATE_CHK(TYPE) \
I really don't like that idea also
Any ideas ?