diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h index 4b8503c53..b1928c4a1 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h @@ -218,9 +218,8 @@ struct TensorPrinter { static void run(std::ostream& s, const Tensor& tensor, const Format& fmt) { typedef typename Tensor::Index IndexType; - static const int layout = Tensor::Layout; - eigen_assert(layout == RowMajor); + eigen_assert(Tensor::Layout == RowMajor); typedef std::conditional_t::value || is_same::value || is_same::value || is_same::value, int, @@ -363,13 +362,12 @@ struct TensorPrinter 0) { const IndexType first_dim = Eigen::internal::array_get<0>(tensor.dimensions()); - Map> matrix(tensor.data(), first_dim, total_size / first_dim); + Map> matrix(tensor.data(), first_dim, total_size / first_dim); s << matrix; return; }