Re: [eigen] latest default changeset (e8aee247f42a) causes compiler error on MSC |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] latest default changeset (e8aee247f42a) causes compiler error on MSC
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sun, 30 Nov 2014 21:31:24 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Z3kVdEdHMZXoBwVo/jROZulkwaN2pHH7pwFd3Uy9+lg=; b=yAIOTxI5WU4DfX6GepQFXrvS/wn0QHWGldgPpD0LMARcXg3ECq2QvQRNDVqmhjWXi1 jaDJgSFNQjwTP6x0ZVqmbcDno3XPmxdD7A7D3ZGDVwLNNfavY0hHiyZV9jFUd6ivuvPB eAYZzH1FXRWC5CSXHpvtOY5OMXY0ENSVkXaGbF9ji6ZooIrhhPKqgEl03VBitKMCivH7 0ywwkCh3G/9sxSBf+GcI+vT8Pb7BPDfUuQWd1KJg3Y83bPAC36eWtXHYEp5lc0fy947i soqBmtbLYJSCWJHEOSXpKlFT1CwqeTwYlkbjBzvbeVd7BxxmYgUcmom7DS8SfnQOC4w3 rFZA==
Hi,
thank you for the notice. Could you confirm that the attached patch works for you?
Thanks
Gael
diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h
--- a/Eigen/src/Core/Diagonal.h
+++ b/Eigen/src/Core/Diagonal.h
@@ -208,25 +208,25 @@ MatrixBase<Derived>::diagonal() const
* Example: \include MatrixBase_diagonal_int.cpp
* Output: \verbinclude MatrixBase_diagonal_int.out
*
* \sa MatrixBase::diagonal(), class Diagonal */
template<typename Derived>
inline typename MatrixBase<Derived>::DiagonalDynamicIndexReturnType
MatrixBase<Derived>::diagonal(Index index)
{
- return typename DiagonalIndexReturnType<DynamicIndex>::Type(derived(), index);
+ return DiagonalDynamicIndexReturnType(derived(), index);
}
/** This is the const version of diagonal(Index). */
template<typename Derived>
inline typename MatrixBase<Derived>::ConstDiagonalDynamicIndexReturnType
MatrixBase<Derived>::diagonal(Index index) const
{
- return typename ConstDiagonalIndexReturnType<DynamicIndex>::Type(derived(), index);
+ return ConstDiagonalDynamicIndexReturnType(derived(), index);
}
/** \returns an expression of the \a DiagIndex-th sub or super diagonal of the matrix \c *this
*
* \c *this is not required to be square.
*
* The template parameter \a DiagIndex represent a super diagonal if \a DiagIndex > 0
* and a sub diagonal otherwise. \a DiagIndex == 0 is equivalent to the main diagonal.
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -241,17 +241,17 @@ template<typename Derived> class MatrixB
EIGEN_DEVICE_FUNC
typename DiagonalIndexReturnType<Index>::Type diagonal();
template<int Index>
EIGEN_DEVICE_FUNC
typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
typedef Diagonal<Derived,DynamicIndex> DiagonalDynamicIndexReturnType;
- typedef const Diagonal<const Derived,DynamicIndex> ConstDiagonalDynamicIndexReturnType;
+ typedef typename internal::add_const<Diagonal<const Derived,DynamicIndex> >::type ConstDiagonalDynamicIndexReturnType;
EIGEN_DEVICE_FUNC
DiagonalDynamicIndexReturnType diagonal(Index index);
EIGEN_DEVICE_FUNC
ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;
template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };