0
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2026-01-18 17:31:19 +01:00

backport is_valid_index_type fix from default branch and c++03

This commit is contained in:
Gael Guennebaud
2019-11-22 13:49:17 +01:00
parent a8d516b04e
commit 1039348f12

View File

@@ -44,7 +44,7 @@ template<typename T> struct is_valid_index_type
internal::is_integral<T>::value || __is_enum(T)
#else
// 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
};
};