template<class valuetype, uint64_t length>
class staticarray< valuetype, length >
The staticarray class allows you to store a pre-defined number of values and access them with array-like syntax.
"valuetype" can be any scalar type, including a pointer, but cannot be an array.
Ie. these are legal: staticarray< int, 10 > d; staticarray< myclass, 10 > d; staticarray< myclass *, 10 > d;
These are not legal and whether they work or even compile would be platform-dependent: staticarray< int[100], 10 > d; staticarray< myclass[100], 10 > d; staticarray< myclass *[100], 10 > d;
However, it is possible to create an array of arrays by nesting staticarrays or dynamicarrays, like:
staticarray< staticarray< int >, 10 > d;
staticarray< staticarray< myclass >, 10 > d;
staticarray< staticarray< myclass * >, 10 > d;
staticarray< dynamicarray< int >, 10 > d;
staticarray< dynamicarray< myclass >, 10 > d;
staticarray< dynamicarray< myclass * >, 10 > d;