As I don't really know where to put, its not really EE related, but is based on something I wondered when browsing the EE headers:
I always wonder how Grzegorz managed to split up header and source of the template classes.
I searched the web and found nothing that answers the question (or at least I'm searching for the wrong thing). I always thought definition and implementation needs to be within one class, but it looks like he managed to split into header and sources. While the header are published for us to be used.
Whenever I try to create a template class with just a constuctor, I'll get a LNK2019 when moving the constructors source from header to source file.
Template-Header:
Code:
template<typename TYPE>
class TClass
{
TClass();
}
Template-Source:
Code:
template<typename TYPE>
TClass<TYPE>::TClass()
{
}
Note:
The class is part of a static library being linked by another project.
And in that another project I'll get a LNK2019 whenever I want to use that class within my code:
TClass<int> _intInstance;
Maybe anybody can give me a hint how to solve this problem, like he did with Esenthel...still wondering how
If you ask where this occured: "Mem Continiuous.h" for example, in fact all memory containers are build like that in EE.