aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise02
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2024-05-08 10:07:57 +0300
committerSyndamia <kamen@syndamia.com>2024-05-08 10:07:57 +0300
commit75cff007b4896eed49b758be0959668673ae1bf3 (patch)
tree6af017d6047c78bce05af166fdbe85cae40692b5 /week10/Exercise02
parent6dd52a7c9d8db3e8b14494ae99e8b9f3b76d1262 (diff)
downloadoop-2023-solutions-75cff007b4896eed49b758be0959668673ae1bf3.tar
oop-2023-solutions-75cff007b4896eed49b758be0959668673ae1bf3.tar.gz
oop-2023-solutions-75cff007b4896eed49b758be0959668673ae1bf3.zip
[w10] Fixed mistakes in certain exercises
Diffstat (limited to 'week10/Exercise02')
-rw-r--r--week10/Exercise02/Array.hpp10
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>