Compiler that translates ML-like source code to C++ template metaprograms