mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
is_convertible<T,Index> does not seems to work well with MSVC 2013, so let's rather use __is_enum(T) for old MSVC versions
This commit is contained in:
parent
4dd767f455
commit
a382bc9364
@ -40,6 +40,8 @@ template<typename T> struct is_valid_index_type
|
||||
enum { value =
|
||||
#if EIGEN_HAS_TYPE_TRAITS
|
||||
internal::is_integral<T>::value || std::is_enum<T>::value
|
||||
#else if EIGEN_COMP_MSVC >= 1500
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user