It sounds like you want to change:
friend ostream& operator << (ostream& out, const Base<T>& e);
To:
template<class T>
friend ostream& operator << (ostream& out, const Base<T>& e);
Related Contents:
- overloading friend operator
- C++ template friend operator overloading
- explicit specialization of template class member function
- How to declare a templated struct/class as a friend?
- c++ template partial specialization member function [duplicate]
- Selecting a member function using different enable_if conditions
- Template specialization of particular members?
- declare template friend function of template class
- ‘friend’ functions and
- How do we declare a friend function with a class template into .h file and define them into a .cpp file (not all in one header file)?
- Template specialization of a single method from a templated class
- Making a template parameter a friend?
- static member initialization for specialized template class
- Overload operators as member function or non-member (friend) function?
- Default template argument and partial specialization
- Where and why do I have to put the “template” and “typename” keywords?
- Why do I have to access template base class members through the this pointer?
- Storing C++ template function definitions in a .CPP file
- C++11 does not deduce type when std::function or lambda functions are involved
- When is the “typename” keyword necessary? [duplicate]
- Officially, what is typename for?
- How should I write ISO C++ Standard conformant custom new and delete operators?
- Why must the copy assignment operator return a reference/const reference?
- initializer_list and template type deduction
- Advantages of auto in template parameters in C++17
- Accessing inherited variable from templated parent class [duplicate]
- C++ template constructor
- Overload resolution failure when streaming object via implicit conversion to string
- How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers
- static_assert fails compilation even though template function is called nowhere
- Specifying one type for all arguments passed to variadic function or variadic template function w/out using array, vector, structs, etc?
- GCC issue: using a member of a base class that depends on a template argument
- What does template mean?
- Why can’t the compiler deduce the template type from default arguments?
- Metaprograming: Failure of Function Definition Defines a Separate Function
- Passing a string literal as a type argument to a class template
- Variadic function template with pack expansion not in last parameter
- How do I define a template function within a template class outside of the class definition?
- multiple definition of template specialization when using different objects
- Nested templates with dependent scope
- Parameter pack must be at the end of the parameter list… When and why?
- Is there a compiler bug exposed by my implementation of an is_complete type trait?
- SFINAE works differently in cases of type and non-type template parameters
- How can I output the value of an enum class in C++11
- Why is it not possible to overload class templates?
- Why can’t templates be within extern “C” blocks?
- c++ –
- C++ overloaded function as template argument
- Can the point-of-instantiation be delayed until the end of the translation unit?
- using extern template (C++11) to avoid instantiation