diff --git a/2023202/main.cpp b/2023202/main.cpp index 9c64056..b666c47 100644 --- a/2023202/main.cpp +++ b/2023202/main.cpp @@ -98,8 +98,8 @@ public: // // Returns a sorted NEW list. // const List sorted(std::function const // &isCorrectOrderFunc) const; - Iterator &&iterate(); - Iterator &&iterate(int index); + Iterator iterate(); + Iterator iterate(int index); }; // template @@ -456,11 +456,11 @@ template int List::index(const E &target) const { // const { return List(*this).sort(isCorrectOrderFunc); // } -template Iterator &&List::iterate() { +template Iterator List::iterate() { return Iterator(this->head); } -template Iterator &&List::iterate(int index) { +template Iterator List::iterate(int index) { // index = this->getIndexInRange(index); if (index == 0) { return Iterator(this->head);