I'm making an N dimensional image format, I want to store the raw data in an
std::array<T, multiple of all dimensions>* where T is the type of single channel pixel value
I want the constructor to take an array of channels like {20, 30, 50} to make a 20x30x50 bitmap for example which would make the total length of data 30000. In the end, I want to be able to declare the channel like this
auto* channelRed = new Channel<uint32_t>({20, 30, 50});
problem is that std::array expects size to be passed in the template parameters and that would throw a wrench in my N dimensional plan.
How can I set up a std::array pointer as a class field in my class so that I could define the length of the array during the constructor execution?
PS! yeah, I know I can easily just use a regular array which is what I'm doing right now. I'm just trying to figure out what std::array is good for.