If I have a non-template class (that is, "normal") and you want to have a template name function, how can I write it without causing a compiler error? Here is an example illustrating what I'm trying to do:
template <class T> void bar(T* ptr); class MyClass // note that this isn't a template class { private: void foo(); template <class T> friend void bar(T*);
I am using Visual Studio 2005, and the specific error I give you is error C2063 , stating that "bar" isnโt a function. What needs to be done differently here?
Brian source share