jeudi 1 octobre 2015

Friend declaration and explicit template instantiation declaration

Suppose I have a function template

template <typename T>
void f(T) {}

Then, we could have a friend declaration

friend void f<int>(int);

and an explicit template instantiation declaration

extern template void f<int>(int);

Are the two declarations related in some way or totally independent? If related, how do they interact with each other?

Aucun commentaire:

Enregistrer un commentaire