C++ Insights - Episode 3: What is behind a range-based for-loop

preview_player
Показать описание
In this episode, I show how range-based for-loops are implemented and what changes were made with the new Standard C++14 and C++20.

---

WORK WITH ME

I'm available for in-house C++ training classes, onsite or remote. You can also check out my self-study courses below.

‼️ 📅 🗓️ UPCOMING OPEN-ENROLLMENT CLASSES AND TALKS 🗓️ 📅 ‼️

Talks

- "Fast and small C++ - When efficiency matters", Meeting C++, November 16
- "Fast and small C++ - When efficiency matters", code::dive, November 25
- "Effizientes C++ - Tips und Tricks aus dem Alltag", ESE Kongress, December 04

STAY CONNECTED

ANDREAS' BOOKS

ANDREAS' SELF-STUDY COURSES

ANDREAS' CONFERENCE VIDEOS

MORE C++ INSIGHTS VIDEOS

SUPPORT THE PROJECT

#cppinsights #cpp
Рекомендации по теме
Комментарии
Автор

By watching this video I was surprised to learn that in the first example, the range-based for-loop includes the '\0' character in the loop. I would have expected the loop to only run 5 times instead of 6. Lesson learned, thanks a lot for the informational video!

RonnieSmets
Автор

This is an excellent way to understand the range-based for loop.

lkumarx
Автор

Would begin and end ever not be of the same type in real life? This is a flexibility I don't see myself ever needing...

jvsnyc