Suppose I have:
template <typename T>
class A
{
//Do something with T
};
I know that the compiler will generate a class A<T>
for each different T
defined in the code.
What if I have:
class B
{
template <typename T>
void f() { /* Do something with T */ }
};
Would there be only one definition of class B
but multiple overloads of f()
for each different T
it's called with?