mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Define non-const operator() in Reverse; enable test for this.
Introduction of DenseCoeffBase (revision bfdc1c4973
) meant that non-const
operator() is only defined if DirectAccess is set. This caused the line
"m.reverse()(1,0) = 4;" in MatrixBase_reverse.cpp to fail at compile-time.
Not sure this is correct solution; perhaps we should disallow this? Or make
Reverse DirectAccess with a negative stride - would that break something?
This commit is contained in:
@@ -380,8 +380,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
||||
/** \returns a matrix expression
|
||||
* where each column (or row) are reversed.
|
||||
*
|
||||
* Example: \include PartialRedux_reverse.cpp
|
||||
* Output: \verbinclude PartialRedux_reverse.out
|
||||
* Example: \include VectorWise_reverse.cpp
|
||||
* Output: \verbinclude VectorWise_reverse.out
|
||||
*
|
||||
* \sa DenseBase::reverse() */
|
||||
const Reverse<ExpressionType, Direction> reverse() const
|
||||
|
||||
Reference in New Issue
Block a user