OSDN Git Service

fix for build on winXP
[moflib/moflib.git] / src / mof / math / basic_matrix.hpp
index 143a8a4..4213283 100644 (file)
@@ -2,6 +2,7 @@
 #include <mof/base/mofdef.hpp>
 #include <mof/math/threshold.hpp>
 #include <boost/operators.hpp>
+#include <boost/utility.hpp>
 #include <ostream>
 #include <iomanip>
 #include <cmath>
@@ -233,16 +234,22 @@ namespace math
         * @brief M[i][j]のように行列の要素を取得するための補助クラス
         */
        template <size_t Dim>
-       class row_of_matrix
+       class row_of_matrix : boost::noncopyable
        {
                size_t index_;
                const float (&elements_)[Dim][Dim+1];
+
        public:
                row_of_matrix(size_t i, const float (&elements)[Dim][Dim+1])
                        : index_(i), elements_(elements)
                {
                }
 
+               row_of_matrix(const row_of_matrix<Dim>&& rhs)
+                       : index_(rhs.index_), elements_(rhs.elements_)
+               {
+               }
+
                float operator[](size_t j) const
                {
                        if (Dim != index_) return elements_[index_][j];