I have a template class where the template parameter corresponds to the size of an array within the class.
template <typename T, size_t S>
class Example {
...
private:
T values[S];
};
This leads to an expected warning: “ISO C++ forbids zero-size array.” In my case, something like Example<uint8_t, 0> would make no sense, and I would like to prevent the code containing Example<..., 0> from compiling.
How do I express in C++ that S should be superior or equal to one?