mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Avoid including <sstream> with EIGEN_NO_IO
(cherry picked from commit b7668c0371)
This commit is contained in:
committed by
Antonio Sanchez
parent
6aaa45db5f
commit
a5469a6f0f
@@ -793,6 +793,7 @@ class SparseMatrix
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DONT_INLINE SparseMatrix& operator=(const SparseMatrixBase<OtherDerived>& other);
|
||||
|
||||
#ifndef EIGEN_NO_IO
|
||||
friend std::ostream & operator << (std::ostream & s, const SparseMatrix& m)
|
||||
{
|
||||
EIGEN_DBG_SPARSE(
|
||||
@@ -837,6 +838,7 @@ class SparseMatrix
|
||||
s << static_cast<const SparseMatrixBase<SparseMatrix>&>(m);
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Destructor */
|
||||
inline ~SparseMatrix()
|
||||
|
||||
@@ -214,7 +214,7 @@ template<typename Derived> class SparseMatrixBase
|
||||
inline void assignGeneric(const OtherDerived& other);
|
||||
|
||||
public:
|
||||
|
||||
#ifndef EIGEN_NO_IO
|
||||
friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m)
|
||||
{
|
||||
typedef typename Derived::Nested Nested;
|
||||
@@ -263,6 +263,7 @@ template<typename Derived> class SparseMatrixBase
|
||||
}
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename OtherDerived>
|
||||
Derived& operator+=(const SparseMatrixBase<OtherDerived>& other);
|
||||
|
||||
@@ -329,6 +329,7 @@ class SparseVector
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef EIGEN_NO_IO
|
||||
friend std::ostream & operator << (std::ostream & s, const SparseVector& m)
|
||||
{
|
||||
for (Index i=0; i<m.nonZeros(); ++i)
|
||||
@@ -336,6 +337,7 @@ class SparseVector
|
||||
s << std::endl;
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Destructor */
|
||||
inline ~SparseVector() {}
|
||||
|
||||
Reference in New Issue
Block a user