Make is_valid_index_type return false for float and double when EIGEN_HAS_TYPE_TRAITS is off.

This commit is contained in:
Rasmus Munk Larsen 2019-06-05 16:42:27 -07:00
parent f715f6e816
commit 6d432eae5d

View File

@ -44,7 +44,7 @@ template<typename T> struct is_valid_index_type
internal::is_integral<T>::value || __is_enum(T) internal::is_integral<T>::value || __is_enum(T)
#else #else
// without C++11, we use is_convertible to Index instead of is_integral in order to treat enums as Index. // without C++11, we use is_convertible to Index instead of is_integral in order to treat enums as Index.
internal::is_convertible<T,Index>::value internal::is_convertible<T,Index>::value && !internal::is_same<T,float>::value && !is_same<T,double>::value
#endif #endif
}; };
}; };