diff --git a/README.md b/README.md index 789a716f5..9f8ff1782 100644 --- a/README.md +++ b/README.md @@ -385,7 +385,7 @@ struct MyIterator { using iterator_category = std::input_iterator_tag; MyIterator& operator++() { - MyContainer.advance(); + target->advance(); return *this; } @@ -394,7 +394,7 @@ struct MyIterator { } reference operator*() const { - return target.get_current(); + return target->get_current(); } MyContainer* target = nullptr;