i am new to creating DLLs and the like, and i have a few questions.
the code i want to package is built heavily upon templates. i am assuming this means that i can only use explicitly declared template parameters into the DLL? For instance, given:
the following can be put into a DLL:Code:template<typename T>class foo
{
T &t;
public:
foo(T&_t):
t(_t)
{
}
};
but i am guessing the following cannot, since DLLs are compiled structures, the template type parameters must be explicitly declared at the time it is compiled:Code:void makeFoo(int i)
{
new foo<int>(i);
}
Code:template<typename T>void makeFoo(T& t)
{
new foo<T>(t);
}
am i correct in my reasoning?
also, can someone please refer me to a good reference on this topic? thanks!