diff options
Diffstat (limited to 'Eigen/src/Core/IO.h')
-rw-r--r-- | Eigen/src/Core/IO.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index 762e1fb31..705cc5605 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -25,12 +25,8 @@ #ifndef EIGEN_IO_H #define EIGEN_IO_H -/** \relates MatrixBase - * - * Outputs the matrix, laid out as an array as usual, to the given stream. - */ template<typename Derived> -std::ostream & operator << +std::ostream & ei_print_matrix (std::ostream & s, const MatrixBase<Derived> & m) { @@ -45,4 +41,16 @@ std::ostream & operator << return s; } +/** \relates MatrixBase + * + * Outputs the matrix, laid out as an array as usual, to the given stream. + */ +template<typename Derived> +std::ostream & operator << +(std::ostream & s, + const MatrixBase<Derived> & m) +{ + return ei_print_matrix(s, m.eval()); +} + #endif // EIGEN_IO_H |