D
dslater
The problem here is that template_class is not a class - it is a
template for creating classes. You can do something like:
friend template_class<foo>;
to make the template_class<foo> class a friend, but
template_class<bar> will not be a friend. To do what you're looking
for would require an extention to the C++ language so that you could
write something like:
template <typename T> friend template_class<T>;
Unfortunatly, this construct simply doesn't exist. I would not be at
all suprised if the designers have a very good reason for this,
although I haven't taken the time to look into it.
template for creating classes. You can do something like:
friend template_class<foo>;
to make the template_class<foo> class a friend, but
template_class<bar> will not be a friend. To do what you're looking
for would require an extention to the C++ language so that you could
write something like:
template <typename T> friend template_class<T>;
Unfortunatly, this construct simply doesn't exist. I would not be at
all suprised if the designers have a very good reason for this,
although I haven't taken the time to look into it.