diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h
index d9f7ee531..f9f893fb4 100644
--- a/Eigen/src/Core/Block.h
+++ b/Eigen/src/Core/Block.h
@@ -56,17 +56,19 @@
*
* \sa MatrixBase::block(int,int,int,int), MatrixBase::block(int,int), class VectorBlock
*/
-template class Block
- : public MatrixBase >
+template
+struct Scalar >
+{ typedef typename Scalar::Type Type; };
+
+template class Block
+ : public MatrixBase >
{
public:
- typedef typename MatrixType::Scalar Scalar;
+ typedef typename Scalar::Type Scalar;
typedef typename MatrixType::AsArg MatRef;
- friend class MatrixBase;
- friend class MatrixBase::Traits;
- typedef MatrixBase Base;
+ friend class MatrixBase;
+ friend class MatrixBase::Traits;
+ typedef MatrixBase Base;
/** Fixed-size constructor
*/
@@ -143,16 +145,16 @@ template
-Block MatrixBase
+template
+Block MatrixBase
::block(int startRow, int startCol, int blockRows, int blockCols)
{
return Block(asArg(), startRow, startCol, blockRows, blockCols);
}
/** This is the const version of block(int,int,int,int). */
-template
-const Block MatrixBase
+template
+const Block MatrixBase
::block(int startRow, int startCol, int blockRows, int blockCols) const
{
return Block(asArg(), startRow, startCol, blockRows, blockCols);
@@ -174,8 +176,8 @@ const Block MatrixBase
*
* \sa class Block, block(int)
*/
-template
-Block MatrixBase
+template
+Block MatrixBase
::block(int start, int size)
{
assert(Traits::IsVectorAtCompileTime);
@@ -186,8 +188,8 @@ Block MatrixBase
}
/** This is the const version of block(int,int).*/
-template
-const Block MatrixBase
+template
+const Block MatrixBase
::block(int start, int size) const
{
assert(Traits::IsVectorAtCompileTime);
@@ -212,8 +214,8 @@ const Block MatrixBase
*
* \sa class Block, block(int,int)
*/
-template
-Block MatrixBase
+template
+Block MatrixBase
::start(int size)
{
assert(Traits::IsVectorAtCompileTime);
@@ -223,8 +225,8 @@ Block MatrixBase
}
/** This is the const version of start(int).*/
-template
-const Block MatrixBase
+template
+const Block MatrixBase
::start(int size) const
{
assert(Traits::IsVectorAtCompileTime);
@@ -248,8 +250,8 @@ const Block MatrixBase
*
* \sa class Block, block(int,int)
*/
-template
-Block MatrixBase
+template
+Block MatrixBase
::end(int size)
{
assert(Traits::IsVectorAtCompileTime);
@@ -261,8 +263,8 @@ Block MatrixBase
}
/** This is the const version of end(int).*/
-template
-const Block MatrixBase
+template
+const Block MatrixBase
::end(int size) const
{
assert(Traits::IsVectorAtCompileTime);
@@ -289,8 +291,8 @@ const Block MatrixBase
*
* \sa class Block, block(int,int,int,int)
*/
-template
-Block MatrixBase
+template
+Block MatrixBase
::corner(CornerType type, int cRows, int cCols)
{
if(type == TopLeft)
@@ -304,8 +306,8 @@ Block MatrixBase
}
/** This is the const version of corner(CornerType, int, int).*/
-template
-const Block MatrixBase
+template
+const Block MatrixBase
::corner(CornerType type, int cRows, int cCols) const
{
if(type == TopLeft)
@@ -334,18 +336,18 @@ const Block MatrixBase
*
* \sa class Block, block(int,int,int,int)
*/
-template
+template
template
-Block MatrixBase
+Block MatrixBase
::block(int startRow, int startCol)
{
return Block(asArg(), startRow, startCol);
}
/** This is the const version of block<>(int, int). */
-template
+template
template
-const Block MatrixBase
+const Block MatrixBase
::block(int startRow, int startCol) const
{
return Block(asArg(), startRow, startCol);
diff --git a/Eigen/src/Core/Coeffs.h b/Eigen/src/Core/Coeffs.h
index c7a438ff0..6ee45c260 100644
--- a/Eigen/src/Core/Coeffs.h
+++ b/Eigen/src/Core/Coeffs.h
@@ -39,8 +39,8 @@
*
* \sa operator()(int,int) const, coeffRef(int,int), coeff(int) const
*/
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::coeff(int row, int col) const
{
eigen_internal_assert(row >= 0 && row < rows()
@@ -52,8 +52,8 @@ Scalar MatrixBase
*
* \sa operator()(int,int), operator[](int) const
*/
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::operator()(int row, int col) const
{
assert(row >= 0 && row < rows()
@@ -75,8 +75,8 @@ Scalar MatrixBase
*
* \sa operator()(int,int), coeff(int, int) const, coeffRef(int)
*/
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::coeffRef(int row, int col)
{
eigen_internal_assert(row >= 0 && row < rows()
@@ -88,8 +88,8 @@ Scalar& MatrixBase
*
* \sa operator()(int,int) const, operator[](int)
*/
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::operator()(int row, int col)
{
assert(row >= 0 && row < rows()
@@ -111,8 +111,8 @@ Scalar& MatrixBase
*
* \sa operator[](int) const, coeffRef(int), coeff(int,int) const
*/
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::coeff(int index) const
{
eigen_internal_assert(Traits::IsVectorAtCompileTime);
@@ -135,8 +135,8 @@ Scalar MatrixBase
* \sa operator[](int), operator()(int,int) const, x() const, y() const,
* z() const, w() const
*/
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::operator[](int index) const
{
assert(Traits::IsVectorAtCompileTime);
@@ -166,8 +166,8 @@ Scalar MatrixBase
*
* \sa operator[](int), coeff(int) const, coeffRef(int,int)
*/
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::coeffRef(int index)
{
eigen_internal_assert(Traits::IsVectorAtCompileTime);
@@ -189,8 +189,8 @@ Scalar& MatrixBase
*
* \sa operator[](int) const, operator()(int,int), x(), y(), z(), w()
*/
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::operator[](int index)
{
assert(Traits::IsVectorAtCompileTime);
@@ -207,43 +207,43 @@ Scalar& MatrixBase
}
/** equivalent to operator[](0). \only_for_vectors */
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::x() const { return (*this)[0]; }
/** equivalent to operator[](1). \only_for_vectors */
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::y() const { return (*this)[1]; }
/** equivalent to operator[](2). \only_for_vectors */
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::z() const { return (*this)[2]; }
/** equivalent to operator[](3). \only_for_vectors */
-template
-Scalar MatrixBase
+template
+typename Scalar::Type MatrixBase
::w() const { return (*this)[3]; }
/** equivalent to operator[](0). \only_for_vectors */
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::x() { return (*this)[0]; }
/** equivalent to operator[](1). \only_for_vectors */
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::y() { return (*this)[1]; }
/** equivalent to operator[](2). \only_for_vectors */
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::z() { return (*this)[2]; }
/** equivalent to operator[](3). \only_for_vectors */
-template
-Scalar& MatrixBase
+template
+typename Scalar::Type& MatrixBase
::w() { return (*this)[3]; }
#endif // EIGEN_COEFFS_H
diff --git a/Eigen/src/Core/Column.h b/Eigen/src/Core/Column.h
index d9aec6c42..7eee89d91 100644
--- a/Eigen/src/Core/Column.h
+++ b/Eigen/src/Core/Column.h
@@ -45,15 +45,19 @@
*
* \sa MatrixBase::col()
*/
+template
+struct Scalar >
+{ typedef typename Scalar::Type Type; };
+
template class Column
- : public MatrixBase >
+ : public MatrixBase >
{
public:
- typedef typename MatrixType::Scalar Scalar;
+ typedef typename Scalar::Type Scalar;
typedef typename MatrixType::AsArg MatRef;
- friend class MatrixBase;
- friend class MatrixBase::Traits;
- typedef MatrixBase Base;
+ friend class MatrixBase;
+ friend class MatrixBase::Traits;
+ typedef MatrixBase Base;
Column(const MatRef& matrix, int col)
: m_matrix(matrix), m_col(col)
@@ -96,17 +100,17 @@ template class Column
* Output: \verbinclude MatrixBase_col.out
*
* \sa row(), class Column */
-template
+template
Column
-MatrixBase::col(int i)
+MatrixBase::col(int i)
{
return Column(asArg(), i);
}
/** This is the const version of col(). */
-template
+template
const Column
-MatrixBase::col(int i) const
+MatrixBase::col(int i) const
{
return Column(asArg(), i);
}
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index ba64f3f40..b7de3b3aa 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -29,8 +29,8 @@
/** \internal
* Helper class to define the MatrixBase::operator<<
*/
-template
-struct MatrixBase::CommaInitializer
+template
+struct MatrixBase::CommaInitializer
{
CommaInitializer(Derived& mat, const Scalar& s)
: m_matrix(mat), m_row(0), m_col(1), m_currentBlockRows(1)
@@ -39,7 +39,7 @@ struct MatrixBase::CommaInitializer
}
template
- CommaInitializer(Derived& mat, const MatrixBase& other)
+ CommaInitializer(Derived& mat, const MatrixBase& other)
: m_matrix(mat), m_row(0), m_col(other.cols()), m_currentBlockRows(other.rows())
{
m_matrix.block(0, 0, other.rows(), other.cols()) = other;
@@ -60,7 +60,7 @@ struct MatrixBase::CommaInitializer
}
template
- CommaInitializer& operator,(const MatrixBase& other)
+ CommaInitializer& operator,(const MatrixBase& other)
{
if (m_col==m_matrix.cols())
{
@@ -94,15 +94,16 @@ struct MatrixBase::CommaInitializer
* Example: \include MatrixBase_set.cpp
* Output: \verbinclude MatrixBase_set.out
*/
-template
-typename MatrixBase::CommaInitializer MatrixBase::operator<< (const Scalar& s)
+template
+typename MatrixBase::CommaInitializer MatrixBase::operator<< (const Scalar& s)
{
- return CommaInitializer(*static_cast(this), s);
+ return CommaInitializer(*static_cast(this), s);
}
-template
+template
template
-typename MatrixBase::CommaInitializer MatrixBase::operator<< (const MatrixBase& other)
+typename MatrixBase::CommaInitializer
+MatrixBase::operator<<(const MatrixBase& other)
{
return CommaInitializer(*static_cast(this), other);
}
diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h
index 9d3dd695c..5314eb793 100644
--- a/Eigen/src/Core/CwiseBinaryOp.h
+++ b/Eigen/src/Core/CwiseBinaryOp.h
@@ -46,19 +46,21 @@
*
* \sa class ScalarProductOp, class ScalarQuotientOp
*/
+template