template<typename> friend class foo
this will however make all templates friends to each other.
But I think this is what you want?
More Related Contents:
- overloading friend operator
- declare template friend function of template class
- C++ template friend operator overloading
- Making a template parameter a friend?
- friend declaration declares a non-template function [duplicate]
- Why do i have a random result on this template?
- Why do I get “unresolved external symbol” errors when using templates? [duplicate]
- How does `void_t` work
- What does it mean to “ODR-use” something?
- How does `is_base_of` work?
- constexpr if and static_assert
- Passing a string literal as a type argument to a class template
- C++ Virtual template method
- How to write a type trait `is_container` or `is_vector`?
- Are inner classes in C++ automatically friends?
- Alias template specialisation
- What do compilers do with compile-time branching?
- Doing a static_assert that a template type is another template
- String literals not allowed as non type template parameters
- (Partially) specializing a non-type template parameter of dependent type
- Forwarding all constructors in C++0x
- How to know if a type is a specialization of std::vector?
- C++ : friend declaration ‘declares a non-template function
- How to check for the type of a template parameter?
- mixing templates with polymorphism
- Why is the STL so heavily based on templates instead of inheritance?
- Local type as template arguments in C++ [duplicate]
- Default values in templates with template arguments ( C++ )
- Obtain container type from (its) iterator type in C++ (STL)
- Template type deduction in C++ for Class vs Function?