Let's say I have a template (helper), and I want all the instance classes of the template to be friends (so I can hide some static member functions as private, even if they periodically change the template arguments inside).
Like this:
template <>
class Foo {
template <>
friend class Foo</* template arguments */>;
};
However, this will not compile since gcc warns me that I specialize in some pattern that is not allowed (should appear in the namespace area). I'm not trying to specialize in anything ...
Is there any way to do this?
, , , . , , ( <>).
:
template <class... Ts>
friend class Foo<Ts...>;