From 1f9a9ef19af95bd8433274e4640f1b8b23f56d46 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 11 Oct 2010 17:42:11 -0400 Subject: Fix typo, and disallow 0-sized EquationSystems. --- src/vZ/EquationSystem.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/vZ') 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 + class EquationSystem<0, T>; + // Traits specialization template class Traits > -- cgit v1.2.3