Have you heard about template metaprogramming? Have you seen how you can use it to calculate factorials at compile time? Have you thought to yourself that this sounds completely useless?
In this tutorial I present a small but real-world application of template metaprogramming. I show switchAny, a tool to dispatch to different code pieces based on the type contained in a Boost.Any holder. I demonstrate a number of TMP techniques used to develop this tool, including new techniques possible only in C++14 and C++1z.Link to github repo