# HG changeset patch # User Robert Carnecky # Date 1312300167 -7200 # Node ID dd2715e57c0dac8694a45ced541e4b824ccf8b7d # Parent 59840032142bfb54a3d236dd2995b06817d60dcf Change internal::nested to always define a const value (fix bug 218) diff -r 59840032142b -r dd2715e57c0d Eigen/src/Core/CwiseUnaryView.h --- a/Eigen/src/Core/CwiseUnaryView.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Core/CwiseUnaryView.h Tue Aug 02 17:49:27 2011 +0200 @@ -97,7 +97,7 @@ protected: // FIXME changed from MatrixType::Nested because of a weird compilation error with sun CC - const typename internal::nested::type m_matrix; + typename internal::nested::type m_matrix; ViewOp m_functor; }; diff -r 59840032142b -r dd2715e57c0d Eigen/src/Core/Fuzzy.h --- a/Eigen/src/Core/Fuzzy.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Core/Fuzzy.h Tue Aug 02 17:49:27 2011 +0200 @@ -35,8 +35,8 @@ static bool run(const Derived& x, const OtherDerived& y, typename Derived::RealScalar prec) { using std::min; - const typename internal::nested::type nested(x); - const typename internal::nested::type otherNested(y); + typename internal::nested::type nested(x); + typename internal::nested::type otherNested(y); return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * (min)(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum()); } }; diff -r 59840032142b -r dd2715e57c0d Eigen/src/Core/ReturnByValue.h --- a/Eigen/src/Core/ReturnByValue.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Core/ReturnByValue.h Tue Aug 02 17:49:27 2011 +0200 @@ -55,7 +55,7 @@ template struct nested, n, PlainObject> { - typedef typename traits::ReturnType type; + typedef typename traits::ReturnType const type; }; } // end namespace internal diff -r 59840032142b -r dd2715e57c0d Eigen/src/Geometry/AlignedBox.h --- a/Eigen/src/Geometry/AlignedBox.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Geometry/AlignedBox.h Tue Aug 02 17:49:27 2011 +0200 @@ -84,7 +84,7 @@ template inline explicit AlignedBox(const MatrixBase& a_p) { - const typename internal::nested::type p(a_p.derived()); + typename internal::nested::type p(a_p.derived()); m_min = p; m_max = p; } @@ -190,7 +190,7 @@ template inline bool contains(const MatrixBase& a_p) const { - const typename internal::nested::type p(a_p.derived()); + typename internal::nested::type p(a_p.derived()); return (m_min.array()<=p.array()).all() && (p.array()<=m_max.array()).all(); } @@ -202,7 +202,7 @@ template inline AlignedBox& extend(const MatrixBase& a_p) { - const typename internal::nested::type p(a_p.derived()); + typename internal::nested::type p(a_p.derived()); m_min = m_min.cwiseMin(p); m_max = m_max.cwiseMax(p); return *this; @@ -236,7 +236,7 @@ template inline AlignedBox& translate(const MatrixBase& a_t) { - const typename internal::nested::type t(a_t.derived()); + typename internal::nested::type t(a_t.derived()); m_min += t; m_max += t; return *this; @@ -309,7 +309,7 @@ template inline Scalar AlignedBox::squaredExteriorDistance(const MatrixBase& a_p) const { - const typename internal::nested::type p(a_p.derived()); + typename internal::nested::type p(a_p.derived()); Scalar dist2 = 0.; Scalar aux; for (Index k=0; k::type lhs(derived()); - const typename internal::nested::type rhs(other.derived()); + typename internal::nested::type lhs(derived()); + typename internal::nested::type rhs(other.derived()); return typename cross_product_return_type::type( internal::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)), internal::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)), diff -r 59840032142b -r dd2715e57c0d Eigen/src/Sparse/SparseFuzzy.h --- a/Eigen/src/Sparse/SparseFuzzy.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Sparse/SparseFuzzy.h Tue Aug 02 17:49:27 2011 +0200 @@ -32,8 +32,8 @@ // typename NumTraits::Real prec // ) const // { -// const typename internal::nested::type nested(derived()); -// const typename internal::nested::type otherNested(other.derived()); +// typename internal::nested::type nested(derived()); +// typename internal::nested::type otherNested(other.derived()); // return (nested - otherNested).cwise().abs2().sum() // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); // } diff -r 59840032142b -r dd2715e57c0d Eigen/src/Sparse/SparseProduct.h --- a/Eigen/src/Sparse/SparseProduct.h Thu Jul 28 13:55:56 2011 +0100 +++ b/Eigen/src/Sparse/SparseProduct.h Tue Aug 02 17:49:27 2011 +0200 @@ -38,11 +38,11 @@ typedef typename internal::conditional, - const typename internal::nested::type>::type LhsNested; + typename internal::nested::type>::type LhsNested; typedef typename internal::conditional, - const typename internal::nested::type>::type RhsNested; + typename internal::nested::type>::type RhsNested; typedef SparseSparseProduct Type; }; diff -r 59840032142b -r dd2715e57c0d unsupported/Eigen/src/Skyline/SkylineProduct.h --- a/unsupported/Eigen/src/Skyline/SkylineProduct.h Thu Jul 28 13:55:56 2011 +0100 +++ b/unsupported/Eigen/src/Skyline/SkylineProduct.h Tue Aug 02 17:49:27 2011 +0200 @@ -27,8 +27,8 @@ template struct SkylineProductReturnType { - typedef const typename internal::nested::type LhsNested; - typedef const typename internal::nested::type RhsNested; + typedef typename internal::nested::type LhsNested; + typedef typename internal::nested::type RhsNested; typedef SkylineProduct Type; };