In my previous article, “visiting variants using lambdas - part 1”, I wrote about a simple technique (using boost::hana) that allows variant visitation using lambdas.

The technique consisted in passing several lambdas to boost::hana::overload in order to create a “local” visitor, without having to define a class/struct.

While discussing upcoming C++17 features with other attendees at CppCon 2016, I was surprised to hear complaints about the fact that std::variant visitation requires an external callable object.

Even though std::visit requires an overloaded callable object as its first argument, it is possible to build such an object locally in the call site: this can easily be achieved by implementing something similar to std::overload, proposed in P0051R2.

The aforementioned task however becomes trivial when using boost::hana.

The video of my CppCon 2016 talk, Implementing static control flow in C++14, is now available on YouTube. Enjoy!

I’ve recently released a script on my GitHub page that simplifies C++ compiler error messages: camomilla.

What does it do?

camomilla uses simple text transformations to make gcc and clang errors smaller and easier to read. During the development of ecst, a compile-time Entity-Component-System C++14 library developed for my BCS thesis, I encountered a lot of huge undeciphrable errors that sometimes completely filled my terminal buffer. Here’s an example:

CppCon 2016 ended yesterday - I had the pleasure of attending and presenting at this amazing conference again this year.

I’m really grateful to Jon Kalb, Bryce Lelbach, the conference staff, the speakers, my company and everyone else involved for making this possible.

In the same vein as my C++Now 2016 trip report, I wanted to share my thoughts regarding the talks I liked the most and regarding my sessions.

An interesting header-only logging library, spdlog, was recently posted on Reddit. A comment by Sean Middleditch sparked an interesting discussion on the thread:

“Header only” is an anti-feature. Fast compiles are important. PCHes only fix a fraction of the problems of header bloat. Avoiding 15 minutes of setup to get a library building/precompiled in exchange for months of lost productivity waiting for slow builds is a pretty bad trade off.

Here are some of the replies:

I’ve spent the last week rewriting the static website generator for vittorioromeo.info from scratch.

Why?

The previous one had several limitations that couldn’t be easily fixed due to poor design:

My C++Now 2016 talks are now available on YouTube!