2 ms·
You can actually drop the extra brackets (at least in C++, but IIRC also in C). C++11 has array<T, size_t> which has proper value semantics. It is implemented
by gpderetta 10y ago
You can actually drop the extra brackets (at least in C++, but IIRC also in C).
C++11 has array<T, size_t> which has proper value semantics. It is implemented exactly like your structure above, so no overhead, and also has a proper operator== and assignment via initializer list.