Extended the comma initializer to support xpr on the right side:

Matrix3i mat; Vector2i vec(33,66);
  mat << vec.transpose(), 99,
         vec, Matrix2i::random();
This commit is contained in:
Gael Guennebaud
2008-03-08 19:46:06 +00:00
parent 721626dfc5
commit f64311e07d
4 changed files with 84 additions and 13 deletions

View File

@@ -182,6 +182,9 @@ template<typename Scalar, typename Derived> class MatrixBase
CommaInitializer operator<< (const Scalar& s);
template<typename OtherDerived>
CommaInitializer operator<< (const MatrixBase<Scalar, OtherDerived>& other);
/** swaps *this with the expression \a other.
*
* \note \a other is only marked const because I couln't find another way