C++ template engine