discussed.
From what I understand, a template declaration and definition is
generally in the same file. (like the standard vector file). So does it
mean there is no way a class can be exposed as a template without
giving out the source? For eg,
template<class T>
class myClass{
public:
void func(T input) ;
};
template<class T>
void myClass<T>::func(T input)
{ /* function definition here...*/}
Let us say someone wants to write a library which implements myClass so
that anyone can use myClass by instantiating the template with the
required type. Is there anyway, that the library can be supplied
without the user having access to source code of "func" method ? I know
this is not a realistic scenario but I dont think it is far fetched to
imagine a good scenario where the auther of the main template may not
want the users to see the code.