A few years ago, I was asked to help typeset some teaching material for a few university courses. It is a tedious chore for many lecturers to maintain teaching material.
C++ provides a few mechanisms for meta programming through its automatic type deduction tools, and the templating engine. This allows for example, compile time evaluation of constants, loop unpacking.
We’ll demonstrate a way to use recursive template functions to evaluate a factorial at compile time, and do loop unpacking. A rough evaluation of the efficacy of these hand micro-optimisations is also considered.
People have been asking about old photos I’ve taken. Here is a small miscellaneous collection.