This is the second template parameter. And the template parameters do not have to be types. They can be constants or patterns. So given
template <typename T, uint32_t max> class TC {};
you must create an instance:
TC< MyClass, 42 > t;
(for example.) Similarly, if it is a function template:
template <typename T, uint32_t max> void tf( T (&array)[max] );
Type inference
can be used to determine the (numerical) value of max .
Such value patterns cannot be of any type; it must be an integral type or pointer or reference.
source share