big eigen2support fix, aimed at users who relied on internal eigen2 stuff: now we dont need customizations in test/eigen2/main.h anymore.

These tests already build:
eigen2_basicstuff
eigen2_adjoint
eigen2_linearstructure
eigen2_prec_inverse_4x4
This commit is contained in:
Benoit Jacob
2011-01-19 11:01:07 -05:00
parent bf0cffa897
commit 96f08213f7
9 changed files with 161 additions and 47 deletions

View File

@@ -429,7 +429,11 @@ struct sqrt_default_impl<Scalar, true>
{
static inline Scalar run(const Scalar&)
{
#ifdef EIGEN2_SUPPORT
eigen_assert(!NumTraits<Scalar>::IsInteger);
#else
EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)
#endif
return Scalar(0);
}
};

View File

@@ -69,6 +69,12 @@ template<typename T> struct GenericNumTraits
AddCost = 1,
MulCost = 1
};
#ifdef EIGEN2_SUPPORT
enum {
HasFloatingPoint = !IsInteger
};
#endif
typedef T Real;
typedef typename internal::conditional<