Template Metaprogramming, Partial Evaluation and Computational Complexity Classes