by userbinator · 10y ago · 0 comments
std::array<std::pointer_to<byte>, 10> str;
certainly does not look any more readable to me than byte *str[10];
. (Disclaimer: I mainly work with C, but find some C++ features genuinely useful, although the majority of the time they seem more like absurd complexity for the sake of complexity.)std::array is useful for letting the compiler avoid array-to-pointer decaying, value semantics, and also actually putting array length type info in a function parameter.