diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-02-13 09:46:20 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-02-13 09:46:20 +0100 |
commit | e7ebe52bfb4b0653e69217d9beac75ca7949e165 (patch) | |
tree | 201e6697f440bbda80c2f480596f9fbae6984b25 /Eigen | |
parent | b3750990d551bc55949c0312a68233e99fc7961a (diff) |
bug #1391: include IO.h before DenseBase to enable its usage in DenseBase plugins.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 2 | ||||
-rw-r--r-- | Eigen/src/Core/DenseBase.h | 12 | ||||
-rw-r--r-- | Eigen/src/Core/IO.h | 14 |
3 files changed, 12 insertions, 16 deletions
diff --git a/Eigen/Core b/Eigen/Core index 9f1c63826..d18835613 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -432,6 +432,7 @@ using std::ptrdiff_t; #include "src/Core/util/IndexedViewHelper.h" #include "src/Core/ArithmeticSequence.h" +#include "src/Core/IO.h" #include "src/Core/DenseCoeffsBase.h" #include "src/Core/DenseBase.h" #include "src/Core/MatrixBase.h" @@ -480,7 +481,6 @@ using std::ptrdiff_t; #include "src/Core/Redux.h" #include "src/Core/Visitor.h" #include "src/Core/Fuzzy.h" -#include "src/Core/IO.h" #include "src/Core/Swap.h" #include "src/Core/CommaInitializer.h" #include "src/Core/GeneralProduct.h" diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index a8229cf03..fc807577b 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -463,7 +463,17 @@ template<typename Derived> class DenseBase EIGEN_DEVICE_FUNC void visit(Visitor& func) const; - inline const WithFormat<Derived> format(const IOFormat& fmt) const; + /** \returns a WithFormat proxy object allowing to print a matrix the with given + * format \a fmt. + * + * See class IOFormat for some examples. + * + * \sa class IOFormat, class WithFormat + */ + inline const WithFormat<Derived> format(const IOFormat& fmt) const + { + return WithFormat<Derived>(derived(), fmt); + } /** \returns the unique coefficient of a 1x1 expression */ EIGEN_DEVICE_FUNC diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index 644228c3f..da7fd6cce 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -109,20 +109,6 @@ class WithFormat IOFormat m_format; }; -/** \returns a WithFormat proxy object allowing to print a matrix the with given - * format \a fmt. - * - * See class IOFormat for some examples. - * - * \sa class IOFormat, class WithFormat - */ -template<typename Derived> -inline const WithFormat<Derived> -DenseBase<Derived>::format(const IOFormat& fmt) const -{ - return WithFormat<Derived>(derived(), fmt); -} - namespace internal { // NOTE: This helper is kept for backward compatibility with previous code specializing |