cpp/language/static assert

Performs compile-time assertion checking.

Explanation
A declaration may appear at namespace and block scope (as a ) and inside a class body (as a ).

If is well-formed and evaluates to, or is evaluated in the context of a template definition and the template is uninstantiated, this declaration has no effect. Otherwise a compile-time error is issued, and the text of, if any, is included in the diagnostic message.