diff --git a/Eigen/src/Core/Fill.h b/Eigen/src/Core/Fill.h index 7a8115e86..dd57ca196 100644 --- a/Eigen/src/Core/Fill.h +++ b/Eigen/src/Core/Fill.h @@ -78,7 +78,7 @@ template struct eigen_fill_impl { using Scalar = typename Xpr::Scalar; static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Xpr& dst, const Scalar& val) { - EIGEN_USING_STD(fill_n); + using std::fill_n; fill_n(dst.data(), dst.size(), val); } template diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index caa8ffada..021f2a8f1 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -302,9 +302,10 @@ class SparseMatrix : public SparseCompressedBase= 0 && j >= 0 && j < m_outerSize && "Invalid parameters"); const Index newRows = IsRowMajor ? m_outerSize + num : rows(); @@ -621,10 +622,12 @@ class SparseMatrix : public SparseCompressedBase(m_outerSize); - if (m_outerIndex[m_outerSize] == 0) - std::fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0)); - else + if (m_outerIndex[m_outerSize] == 0) { + using std::fill_n; + fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0)); + } else { for (Index j = 0; j < m_outerSize; j++) m_innerNonZeros[j] = m_outerIndex[j + 1] - m_outerIndex[j]; + } } /** Suppresses all nonzeros which are \b much \b smaller \b than \a reference under the tolerance \a epsilon */ @@ -695,9 +698,10 @@ class SparseMatrix : public SparseCompressedBase 0) { StorageIndex lastIdx = m_outerSize == 0 ? StorageIndex(0) : m_outerIndex[m_outerSize]; - std::fill_n(m_outerIndex + m_outerSize, outerChange + 1, lastIdx); + using std::fill_n; + fill_n(m_outerIndex + m_outerSize, outerChange + 1, lastIdx); - if (!isCompressed()) std::fill_n(m_innerNonZeros + m_outerSize, outerChange, StorageIndex(0)); + if (!isCompressed()) fill_n(m_innerNonZeros + m_outerSize, outerChange, StorageIndex(0)); } } m_outerSize = newOuterSize; @@ -741,7 +745,8 @@ class SparseMatrix : public SparseCompressedBase(m_innerNonZeros, m_outerSize); m_innerNonZeros = 0; - std::fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0)); + using std::fill_n; + fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0)); } /** \internal @@ -843,7 +848,8 @@ class SparseMatrix : public SparseCompressedBase