compile-time iteration with C++20 lambdas -- Vittorio Romeo

Save to:
Instapaper Pocket Readability

This article covers various compile-time "iteration" constructs that rely on the upcoming "familiar template syntax for lambdas" C++20 feature.

compile-time iteration with C++20 lambdas

by Vittorio Romeo

From the article:

In this article I'm going to show you how to implement the above constructs, relying on a new nifty addition to C++20 lambdas: [P0428: "Familiar template syntax for generic lambdas"], by Louis Dionne. [...]

It shows how to implement constructs for the following operations:

Iterating over a list of types;
Iterating over a list of compile-time values;
Iterating over a compile-time integral range;
Enumerating a list of types alongside their indices.
The code provided works on g++ 8

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.