summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vZ/EquationSystem.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vZ/EquationSystem.hpp b/src/vZ/EquationSystem.hpp
index 6409f18..790676c 100644
--- a/src/vZ/EquationSystem.hpp
+++ b/src/vZ/EquationSystem.hpp
@@ -37,8 +37,8 @@ namespace vZ
// EquationSystem();
// ~EquationSystem();
- T& operator[](std::size_t i) { return m_values[0]; }
- const T& operator[](std::size_t i) const { return m_values[0]; }
+ T& operator[](std::size_t i) { return m_values[i]; }
+ const T& operator[](std::size_t i) const { return m_values[i]; }
EquationSystem& operator+=(const EquationSystem& rhs);
EquationSystem& operator-=(const EquationSystem& rhs);
@@ -49,6 +49,10 @@ namespace vZ
T m_values[N];
};
+ // Disallow 0-sized EquationSystems
+ template <typename T>
+ class EquationSystem<0, T>;
+
// Traits specialization
template <std::size_t N, typename T>
class Traits<EquationSystem<N, T> >