summaryrefslogtreecommitdiff
path: root/boost/numeric/ublas/operation/num_rows.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/numeric/ublas/operation/num_rows.hpp')
-rw-r--r--boost/numeric/ublas/operation/num_rows.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/boost/numeric/ublas/operation/num_rows.hpp b/boost/numeric/ublas/operation/num_rows.hpp
index 856256ff29..246aed3caf 100644
--- a/boost/numeric/ublas/operation/num_rows.hpp
+++ b/boost/numeric/ublas/operation/num_rows.hpp
@@ -5,7 +5,7 @@
*
* \brief The \c num_rows operation.
*
- * Copyright (c) 2009, Marco Guazzone
+ * Copyright (c) 2009-2012, Marco Guazzone
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
@@ -19,6 +19,8 @@
#include <boost/numeric/ublas/detail/config.hpp>
+#include <boost/numeric/ublas/expression_types.hpp>
+#include <boost/numeric/ublas/traits.hpp>
namespace boost { namespace numeric { namespace ublas {
@@ -31,9 +33,9 @@ namespace boost { namespace numeric { namespace ublas {
*/
template <typename MatrixExprT>
BOOST_UBLAS_INLINE
- typename MatrixExprT::size_type num_rows(MatrixExprT const& m)
+ typename matrix_traits<MatrixExprT>::size_type num_rows(matrix_expression<MatrixExprT> const& me)
{
- return m.size1();
+ return me().size1();
}
}}} // Namespace boost::numeric::ublas