Tiny Metaprogramming Library—Eric Niebler

eric-niebler-toronto.PNGWe like to link to articles at all levels. This one's near the top of the scale, for those looking for a real challenge:

Tiny Metaprogramming Library

by Eric Niebler

As the intro says [emphasis ours]:

(Difficult-to-grok metaprogramming below. Not for the faint of heart.)

From the rest of the introduction:

At the recent Urbana-Champaign meeting of the C++ Standardization Committee, Bill Seymour presented his paper N4115: Searching for Types in Parameter Packs which, as its name suggests, describes a library facility for, uh, searching for a type in a parameter pack, among other things. It suggests a template called packer to hold a parameter pack:

// A class template that just holds a parameter pack:
template <class... T> struct packer { };

Many of you are probably already familiar with such a facility, but under a different name:

// A class template that is just a list of types:
template <class... T> struct typelist { };

It became clear in the discussion about N4115 that C++ needs a standard typelist template and some utilities for manipulating them. But what utilities, exactly? ...

Where will Evolution lead C++17?

The third part of my series about the proposals for Urbana is about the subgroup evolution:

Where will Evolution lead C++17?

by Jens Weller

From the article:

This is the third part in my series about the proposals for the current C++ committee meeting in Urbana. This time its all about the subgroup Evolution, which has the most papers, so this is only the first part. The previous parts were about concurrency, and Part 2 about core, networking, models and undefined behavior.

Looking for C++17 - Urbana Proposals for Core, Modules, Networking, Reflection and UB

The second part of my series on the C++ Proposals for the next Committee meeting in Urbana:

Looking for C++17 - Urbana Proposals for Core, Modules, Networking, Reflection and UB

by Jens Weller

From the Article:

The second part of my series about the proposals for Urbana, where the next C++ committee meeting will be held. The papers grand us a first view on a distant future - C++17...

C++ and Zombies: a moving question

One of the issues I was thinking about since C++Now: move and move-destruction

C++ and Zombies: a moving question

by Jens Weller

From the article:

This has been on my things to think about since C++Now. At C++Now, I realized, that we've might got zombies in the C++ standard. And that there are two fractions, one of them stating, that it is ok to have well defined zombies, while some people think that you'd better kill them.

Urbana Proposals - C++17 insight?

I've started with my series on the proposals for the next C++ Committee Meeting:

Urbana Proposals - C++17 insight?

by Jens Weller

From the article:

A short series to give you an overview over the Papers submitted in the latest mailing for the C++ Committee Meeting in Urbana-Champaign in Illinois. At the beginning of November the C++ Committee will have its 3rd Meeting this year. As C++14 is now finished, the focus is clearly on the upcoming C++17 standard.

A pair of articles on advanced template mechanics—Eli Bendersky and Eric Niebler

If you're a very advanced C++ developer with an appetite for template mechanics, these two articles that were posted in the past 24 hours may interest you.

Note: The vast majority of C++ developers don't need to know this, but very advanced developers will find the material and the techniques interesting.

SFINAE and enable_if

by Eli Bendersky

Customization Point Design in C++11 and Beyond

by Eric Niebler

Embedding Lisp in C++: A Recipe—Chris Kohlhepp

Look at this image again: That's C++ in Lisp. And that's just for starters...

Embedding Lisp in C++ -- A Recipe

by Chris Kohlhepp

As a teaser, consider this from midway through the article:

Just to recap, so far we have seen C++ calling in-line Lisp; Lisp calling C++; a Lisp REPL inside of a C++ process; a full symbolic Lisp debugger inside of C++; byte compiled and interpreted mode of execution; as well as trivial Live-Programming.

We are yet to see full integration with Lisp’s package management system and fully compiled Lisp code inside of C++...

C++ Templates series—Feabhas

Here's a recent series that just got a new instalment today: It introduces template basics in a nicely explained and accessible way suitable for a gentle introduction, and then going on to progressively help the reader develop stronger template muscles.

C++ Templates series

by Feabhas

An Introduction to C++ Templates

Template Classes

Template Inheritance

Templates and Polymorphism

Template Member Functions

Variadic Templates

Templates of Templates

And today: Template Specialization

From the Introduction:

Templates are a very powerful -- but often very confusing -- mechanism within C++. However, approached in stages, templates can be readily understood (despite their heinous syntax).

The aim of this series of articles is to guide beginners through the syntax and semantics of the foundation concepts in C++ template programming.

Fun with Lambdas: C++14 Style (Part 3)—Sumant Tambe

sumant-tambe.PNGMore rapid-fire "now write this using lambdas" problem-solution drill with Sumant Tambe:

Fun with Lambdas: C++14 Style (Part 3)

by Sumant Tambe

From the article:

Now that we have C++14, it has opened up doors for truly mind-bending uses of lambdas--more specifically--generic lambdas. This blog post is the third installment in the series of "Fun with Lambdas: C++14 Style". Check out part 1 and part 2 if you have not already.

This post is about "monadic tuples"...