Posts
Serializing structs with C++17 structured bindings
December 29, 2016•3,519 words
Serializing data in C++ is a surprisingly difficult problem. There are many libraries for it with varying degrees of finesse, power and ease of use...
strings as types with c++17 constexpr lambdas
August 25, 2016•633 words
Recently I stumbled upon a question by @arne_mertz of Simplify C++ fame (if you don't read that blog, start now!) about using string literals as ty...
Succinct and helpful C++ template compilation errors
May 18, 2016•1,274 words
We've all experienced them, the long and unhelpful compilation errors from templates, usually referring to some internal header you didn't even kno...
Cache optimizing a priority queue
August 3, 2015•1,605 words
I must begin with saying that if you found this because you have a performance problem, you should almost certainly look elsewhere. It is highly un...
Performance observations on a C++ vector of lambdas
June 5, 2015•1,339 words
Edit 2015-Jun-7: The source code is available on GitHub When writing unit tests, you typically don't care much about execution speed, but compile t...
Compile time quicksort in idiomatic modern C++
January 18, 2015•1,636 words
A contender for the most useless program ever written just got a much needed overhaul. In 2011 I wrote about compile time quick sort as a challenge...