When allocating on the stack, I don't necessarily need to know the size of a C array being allocated at compile time. i.e. I can do this:
void foo(size_t s) {
uint8_t bar[s]; // `s` not known at compile time
some_func_that_uses_bar(bar, sizeof(bar));
}
However, to be less error-prone, it feels I should be able to do this with C++ std::array
s as well, yet I haven't been able to figure out how (nor whether it's even possible).