cpp/meta

C++ provides metaprogramming facilities, such as type traits, compile-time rational arithmetic, and compile-time integer sequences.

Type property
These type traits define compile-time template-based interfaces to query the properties of types.

Attempting to specialize a template defined in the header and described in this section results in undefined behavior.

A template defined in the header may be instantiated with an incomplete type unless otherwise specified, notwithstanding the general prohibition against instantiating standard library templates with incomplete types.

Base classes
Two specializations of std for the type are provided:

Type modifications
These type traits apply modifications on a template parameter, and declare (sometimes conditionally) the member typedef as the resulting type.

Attempting to specialize a template defined in the header and described in this section results in undefined behavior, except that std  may be specialized as required in description.

A template defined in the header may be instantiated with an incomplete type unless otherwise specified, notwithstanding the general prohibition against instantiating standard library templates with incomplete types.

Compile-time rational arithmetic
The header provides types and functions for manipulating and storing compile-time ratios.