How to Iterate through std::tuple: C++26 Packs and Expansion Statements -- Bartlomiej Filipek
In this final part of the tuple-iteration mini-series, we move beyond C++20 and C++23 techniques to explore how C++26 finally brings first-class language support for compile-time iteration. With structured binding packs (P1061) and expansion statements (P1306), what once required clever template tricks can now be written in clean, expressive, modern C++.
C++ Templates: How to Iterate through std::tuple: C++26 Packs and Expansion Statements
by Bartlomiej Filipek
From the article:
In part 1 of this mini-series, we looked at the basics of iterating over a
std::tupleusingindex_sequenceand fold expressions. In part 2, we simplified things withstd::applyand even created helpers likefor_each_tupleandtransform_tuple.So far, we used C++ features up to C++20/23… but now, in C++26, we finally get language-level tools that make tuple iteration straightforward and expressive. In this article, we’ll explore two new techniques:




A long-delayed dream finally came true: after years of near-misses and lessons learned (“better to be invited than sent”), I made it to CppCon—and it was bigger, louder, and more inspiring than I imagined. In this recap I share the vibe of the week, five standout talks and ideas, a few notes from my own session, and links to recordings as they appear.