mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
compile fix for code like Vector3d::Random().x()
This commit is contained in:
parent
0e60e22151
commit
312013a089
@ -91,7 +91,10 @@ class CwiseNullaryOp : ei_no_assignment_operator,
|
|||||||
|
|
||||||
const Scalar coeff(int index) const
|
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>
|
template<int LoadMode>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user