Summary: Verifying properties of programs is a common way to
ensure the proper behaviour of those programs. Invariants, pre-
and postconditions are program properties often used when
proving correctness of programs. \par C++ Template MetaPrograms
(TMPs) are special progams interpreted by the compiler.
Metaprograms are widely used for the following purposes:
executing algorithms in compile-time, optimizing runtime
programs and emitting compilation errors and warnings to enforce
certain semantic checks. \par In this paper we step to ``meta-
meta-level'': we present a technique to make safer C++ TMPs with
static asserts. We describe how to check invariants, pre- and
postconditions of TMPs and enforce the compiler to refuse
metaprograms if any of the specified program properties is
dissatisfied. We present some examples where semantic errors in
TMPs are revealed by our method.