Wednesday 

Room 5 

10:20 - 11:20 

(UTC+02

Talk (60 min)

C++ ranges - demystifying filter and transform

This will be a talk that takes a hands-on look at std::ranges::views in modern C++, with a special focus on filter and transform and how they work together.

C++
Language

The talk is meant to be interactive — the audience will be invited to guess the output of short code examples before they are revealed, hopefully giving people a few surprises and making the lessons stick better.

Through these examples, the talk covers how lazy evaluation works under the hood, why the order of view composition has real consequences, and how filter's caching of begin() can produce results that catch even experienced developers off guard.

Composing transform and filter in the wrong order leads to unexpectedly frequent function calls; introducing mutable state into a filter predicate produces stranger results still.

The goal is an audience that leaves with both a solid mental model of view pipelines and a healthy respect for what "lazy" really means in practice and what you should - and more important - never should do with a filter view.

This talk has not been presented fully before, but is based on a similar interactive talk I held back in 2024 for reMarkable guild-cpp. I will link to the presentation used there, with a few added pages indicating some of the additional talk points I plan to add.

The actual description to be used for NDC could be someting like:

Modern C++ ranges and views offer a powerful, composable way to work with sequences of data — but they come with subtleties that can surprise even experienced developers. In this talk we'll explore std::ranges::views, with a focus on filter and transform. Along the way, we'll pause and ask: what do you think the output will be?
Through some examples, we'll uncover how lazy evaluation actually works under the hood, why the order of view composition matters more than you might expect, and how filter's caching of begin() can lead to surprising results.
The goal is an audience that leaves with both a solid mental model of view pipelines and a healthy respect for what "lazy" really means in practice — whether they are encountering ranges for the first time or thought they already had them figured out.

Ole Bøe

Ole Bøe is a senior software developer at reMarkable with a keen interest in the C++ language.

He has been a professional C++ developer since before the language was standardized and is old enough to have discovered and fixed real y2k bugs in Borland's C++ libraries.