29 Aug, 2016

Episode Eleven: To Kill a Move Constructor

Unlike copy operations, which are provided by the compiler if not user declared, move operations can and often are suppressed such that a class might not have one. Furthermore, it is possible for a class to have a —user declared— move operation which is both defined as deleted, and at the same time ignored by overload resolution, as if it didn't exist.

01 Jan, 2016


One year down the road, 2015 has gone by but not without modifications to the C++ lands. Several Technical Specification (TS) documents were published, and heavy work continues to go into both existing and new ones. Meanwhile, work is underway for what it is intended to be C++17...

16 Nov, 2015

True Story: Efficient Packing

Variadic templates made its way into the C++ lands with C++11, in the form of parameter packs. A parameter pack is a parameter that accepts zero or more arguments; a template with at least one parameter pack is called a variadic template. What follows is a story on how to use them efficiently...

18 Oct, 2015

Rant: On the std::experimental::variant to come

Variant has been a hot topic in the C++ lands ever since one has been proposed for inclusion into the standard library. It's a controversial topic, the term is loaded. Variant means different things to different target audiences, ranging all the way from a very low level problematic smart union to a very high level problematic type theory concept. Reaching a compromise that services both ends well is bound to be challenging...

23 Mar, 2015

Eggs.Variant - Part II (the constexpr experience)

Ruminations on the development of Eggs.Variant, a C++11/14 generic, type-safe, discriminated union. Part I explored a straightforward implementation based on untyped raw storage appropriate to hold any of the variant members. It was noted, however, that such an implementation would never be constexpr-aware. It's time to throw it away and start from scratch in order to properly support constexpr.

01 Jan, 2015


One year down the road, 2014 has gone by but not without modifications to the C++ lands. C++14 was completed, and Clang has already reached full conformance! But it's not the end of the road, while the Technical Specification (TS) documents continue to move forward, work has started on what it is intended to be C++17...

10 Sep, 2014

Episode Ten: When Size Does Matter

In the C++ lands every object has mass; for any complete type T, sizeof(T) is greater than zero. This keeps array indexing and pointer arithmetics from collapsing, but it also means that empty objects occupy space. Furthermore, when an empty object is placed in a class next to a bigger member, padding may —and in all likeliness will— be added due to alignment requirements, resulting in an empty member taking more than just one byte of storage. Certainly something has to be done about this...

← Older posts