From 91d0ca9f4f01aca159cbf419147b6155c7091bdd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 18 Mar 2025 18:55:16 +0100 Subject: [PATCH] sidearray constructors --- geometry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/geometry.cpp b/geometry.cpp index b7fdb04d..cd1390b4 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -49,6 +49,9 @@ constexpr SIDE allsides[] = { constexpr int SIDEPARS = int(SIDE::GUARD); template struct sidearray : array { + sidearray() {}; + // not needed in newer C++ standards, I do not know how to do this correctly in C++11 + constexpr sidearray(T a, T b, T c, T d, T e, T f, T g, T h, T i, T j, T k, T l, T m) : array ({a,b,c,d,e,f,g,h,i,j,k,l,m}) {}; T& operator [] (SIDE s) { return array::operator[] ((int) s); }; const T& operator [] (SIDE s) const { return array::operator[] ((int) s); }; };