The preliminary investigation of template with C

This paper describe the relationship between C++ templates and partial evaluation. In C++, templates were designed to support generic programming, but not deliberately provided the ability to perform compile‐time computations and code generation. These features are completely deliberate, and as a result their syntax is ill at ease. After a review, these features in terms of partial evaluation, a much simpler syntax can be achieved. In C++, it may be regarded as a two‐level language in which types are first‐class values. Template instantiation resembles an offline partial assessor. In this paper, we explain groundwork in the direction of a single mechanism based on Partial Evaluation which unifies generic programming, compile‐time computation and code generation. The language Catat is introduced to demonstrate these ideas.