matrix: make rows/cols constexpr

This commit is contained in:
Danny Robson 2016-08-15 17:34:24 +10:00
parent 43b59c6801
commit cee2b7b516

View File

@ -27,8 +27,8 @@ namespace util {
struct matrix {
T values[S][S];
static const size_t rows = S;
static const size_t cols = S;
static constexpr size_t rows = S;
static constexpr size_t cols = S;
// index operators return a pointer into the data array so that
// multidimensional array syntax can be used transparently on this