diff options
Diffstat (limited to 'week10/Exercise02/Array.hpp')
| -rw-r--r-- | week10/Exercise02/Array.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/week10/Exercise02/Array.hpp b/week10/Exercise02/Array.hpp index 114a1bc..6c2d95b 100644 --- a/week10/Exercise02/Array.hpp +++ b/week10/Exercise02/Array.hpp @@ -22,9 +22,13 @@ public: T& operator[](unsigned index); T& operator[](unsigned index) const; Array<T>& operator+=(const Array<T>& right); - friend bool operator==(const Array<T>& left, const Array<T>& right); - friend bool operator!=(const Array<T>& left, const Array<T>& right); - friend Array<T> operator+(const Array<T>& left, const Array<T>& right); + + template <class U> + friend bool operator==(const Array<U>& left, const Array<U>& right); + template <class U> + friend bool operator!=(const Array<U>& left, const Array<U>& right); + template <class U> + friend Array<U> operator+(const Array<U>& left, const Array<U>& right); }; template <class T> |
