When I was first introduced to the concept of template meta programming (TMP) I thought it was black magic! Well, it is, and remains so, until you see things from the correct perspective.
Coming from an imperative programming background I have the (bad?) habit of understanding functions as a sequence of operations, this is great, until it holds you back and doesn’t work anymore. Template meta programming in C++ is all about doing computations at compile time, before the program run. Read more