diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-08-23 02:19:03 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-08-23 02:19:03 +0000 |
commit | 312013a08911816e287425d598e55e5d356e0ac5 (patch) | |
tree | 23d6e55855892bfc8be7e76eafc52efd52199dd5 /Eigen/src/Core | |
parent | 0e60e22151c8edafda76b233370bb8f0030fc6ab (diff) |
compile fix for code like Vector3d::Random().x()
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/CwiseNullaryOp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index aae396add..caa86fa97 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -91,7 +91,10 @@ class CwiseNullaryOp : ei_no_assignment_operator, const Scalar coeff(int index) const { - return m_functor(index); + if(RowsAtCompileTime == 1) + return m_functor(0, index); + else + return m_functor(index, 0); } template<int LoadMode> |