Tag: stdarray
-
Convenient way to declare 2D (or even higher dimension) arrays with std::array
26 I’m about to convert a lot of old C++ code to more modern C++. There are many raw 2D arrays in that code like: Foo bar[XSIZE][YSIZE]; And I’m about to replace these declarations with std::array<std::array<Foo, YSIZE>, XSIZE> bar; This is a convenient way because the statements stay the same and the code is supposed…