Considering the following code:
template<typename T>
struct A
{
void f(){...}
friend T;
};
template<typename T>
struct B
{
void f(T){...}//code depends on T
void g(){...}//code doesn't depends on T
}
As you see, the "code" in the struct A doesn't depend on T.
Will the compiler generate different code in the final binary for every T used to instantiate A?
Same question for B::g() function, will the compiler use the same function for all instances of B<T> when it's possible, for example this is not used in g(), so no dependency on T? Does the standard have any specification for this case?