STL C++ Iterators - Writing an iterator from scratch | Modern Cpp Series Ep. 138
►Full C++ Series Playlist: • The C++ Programming Language ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: / @mikeshah ►Lesson Description: In this lesson I show you how to write an iterator from scratch that is compatible with range-based for-loops. We'll set the stage for how to also make this iterator compatible with several std::algorithm STL algorithms as well! 00:00 Introduction 00:58 Iterators review and use 03:50 Example of STL vector and usage with iterators 05:40 Cpp insights view of ranged-based for loops and iterators 08:00 Swapping STL data structures 08:45 Figuring out which member functions we need for iterators 09:41 Example data structure explanation 11:40 Adding 'begin' and 'end' stubs and 'iterator' struct 14:00 Adding 'struct iterator' 14:40 Design Decision on our iterators bookkeeping strategy 15:25 iterator Constructor 16:12 Idea that we can have multiple iterators to same container 17:20 Cleaning up our iterator, inspired by STL design 18:30 Placeholders for distance (ptrdiff_t) 19:40 Placeholder for iterator category 21:40 Filling out 'begin' and 'end' 23:28 'end' is beyond the data structure 24:58 Implementing pre increment and post increment 29:07 Dereference operator 31:00 Adding arrow operator 32:53 Implementing "operator==" and "operator!=" 35:20 Fixing bug with pre increment 36:00 WORKING iterator -- very cool! 37:40 Review of our implementation 40:30 Wrap up and thank you to our members and subscribers ►YouTube Channel: / mikeshah ►Please like and subscribe to help the channel! ►Join our free community: https://courses.mshah.io/communities/...

STL C++ Iterators - Writing an iterator from scratch (Code Review) | Modern Cpp Series Ep. 139

STL C++ Iterators - Introduction | Modern Cpp Series Ep. 135

STL C++ Iterators - Iterator Invalidation | Modern Cpp Series Ep. 140

Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023

Most Mechanical Engineers Use the Wrong Fasteners

STL std::map | Modern Cpp Series Ep. 126

Writing an ITERATOR in C++

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

They Lied to You About AI (This Study Proves It)

Back to Basics: Iterators in C++ - Nicolai Josuttis - CppCon 2023

C++ RVO: Return Value Optimization for Performance in Bloomberg C++ Codebases - Michelle Fae D'Souza

Why The Russian Accent Terrifies Everyone

The Insane Genius of a Formula 1 Gearbox

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

The worst programming language of all time

ITERATORS in C++

C++ STL Tutorial: Iterators

Professor Jiang: World War 3 Is About To Begin, Let Me Explain!

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

