nkr
A C++20 library with a custom meta-programming language.
nkr::constant Namespace Reference

Constant types are used to represent values that cannot be changed. More...

Detailed Description

Constant types are used to represent values that cannot be changed.

The primary use of a constant type is for template type parameters. It's true that a literal type can directly be used in a template parameter list, but this interferes with template parameter packs and their use as a means to achieve genericism in the library. In other words, constant types can be used to fulfill the principle of one kind of template parameter.

Note
Constant types are similar to the standard C++ std::integral_constant.