Which of these would be the proper declaration for overloading the stream insertion operator of a templated class? templ
Posted: Fri Apr 29, 2022 8:04 am
Which of these would be the proper declaration for overloading the stream insertion operator of a templated class? template <class T> class List{ template <class T> friend ostream& operator<<(ostream&, const List<T>&); public: List(); List(); 1/other functions template <class T> class List{ friend ostream& operator<<(ostream&, const List<T>&); public: List(); -List(); 1/other functions } template <class T> class List{ template <class V> friend ostream& operator<<(ostream&, const List<v>&); public: List(); -List(); //other functions None of these.