mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
introduce DenseCoeffsBase: this is where the coeff / coeffRef / etc... methods go.
Rationale: coeffRef() methods should only exist when we have DirectAccess. So a natural thing to do would have been to use enable_if, but since there are many methods it made more sense to do the "enable_if" for the whole group by introducing a new class. And that also that the benefit of not changing method prototypes.
This commit is contained in:
@@ -152,6 +152,7 @@ template<typename MatrixType> void basicStuffComplex(const MatrixType& m)
|
||||
VERIFY(!static_cast<const MatrixType&>(cm).imag().isZero());
|
||||
}
|
||||
|
||||
#ifdef EIGEN_TEST_PART_2
|
||||
void casting()
|
||||
{
|
||||
Matrix4f m = Matrix4f::Random(), m2;
|
||||
@@ -160,6 +161,7 @@ void casting()
|
||||
m2 = m.cast<float>(); // check the specialization when NewType == Type
|
||||
VERIFY(m.isApprox(m2));
|
||||
}
|
||||
#endif
|
||||
|
||||
void test_basicstuff()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user