An Efficient, Versatile C++ Templating Framework