diff options
1 files changed, 2 insertions, 2 deletions
| -rw-r--r-- | Sem. 10/Examples/Optional/Optional.hpp | 4 |
diff --git a/Sem. 10/Examples/Optional/Optional.hpp b/Sem. 10/Examples/Optional/Optional.hpp index 147d8e5..8b52fdc 100644 --- a/Sem. 10/Examples/Optional/Optional.hpp +++ b/Sem. 10/Examples/Optional/Optional.hpp @@ -13,7 +13,7 @@ public: Optional(const T& obj); Optional(const Optional<T>& other); - Optional<T> operator=(const Optional<T>& other); + Optional<T>& operator=(const Optional<T>& other); bool containsData() const; const T& getData() const; @@ -85,7 +85,7 @@ Optional<T>::Optional(const Optional<T>& other) template <typename T> -Optional<T> Optional<T>::operator=(const Optional<T>& other) +Optional<T>& Optional<T>::operator=(const Optional<T>& other) { if (this != &other) { |
