I figured out, once upon a time, the syntax to make a template class a friend. When I did that I was using Borland, but I am in the middle of an MFC app and am just now discovering that (as usual) MSVC is not handling this template functionality. What I need to know is if there is a workaround because if not, I will have to do the only other alternative and make a few private members public or provide accessors to them (how mongoloid is that?).
To recap, this is what I'm trying to do:
Code:
class Foo {
template <typename L>
friend class Bar;
int some_member;// that Bar needs to access
};
This does not even compile in MSVC (the primary error is "<end parse>"). I took a shot in the dark and tried leaving out the template line, but that just leaves instantiated objects of type Bar non-friends.
Any bright (or even gloriously dim) ideas?