Fix bug #583: add compile-time check that DenseIndex is signed

This commit is contained in:
Gael Guennebaud 2013-06-10 17:16:16 +02:00
parent ca67c60150
commit 18e476107e

View File

@ -13,6 +13,16 @@
namespace Eigen {
namespace internal {
// The index type defined by EIGEN_DEFAULT_DENSE_INDEX_TYPE must be a signed type.
// This dummy function simply aims at checking that at compile time.
static inline void check_DenseIndex_is_signed() {
EIGEN_STATIC_ASSERT(NumTraits<DenseIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);
}
} // end namespace internal
/** \class DenseBase
* \ingroup Core_Module
*