This is a commonly seen template function
template <typename T>
void func(T param) {
// ...
}
However, I also see templates which look like this:
template <typename T, std::size_t N> // note the extra N
void func(T param) {
// ...
}
I know this is legal, but obvious N has nothing to do with parameters' type. What's the official rule here on adding an extra integer in the template? What is this called? Can I make the extra template param to be a float or double instead of integer? If not, why integer is special?