mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-24 02:29:33 +08:00
std::integral_constant is not C++03 compatible
This commit is contained in:
parent
1b7294f6fc
commit
0c9ad2f525
@ -36,14 +36,16 @@ inline IndexDest convert_index(const IndexSrc& idx) {
|
||||
|
||||
// true if T can be considered as an integral index (i.e., and integral type or enum)
|
||||
template<typename T> struct is_valid_index_type
|
||||
: std::integral_constant<bool,
|
||||
{
|
||||
enum { value =
|
||||
#if EIGEN_HAS_TYPE_TRAITS
|
||||
internal::is_integral<T>::value || std::is_enum<T>::value
|
||||
#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
|
||||
#endif
|
||||
> {};
|
||||
};
|
||||
};
|
||||
|
||||
// promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
|
||||
// expression * scalar
|
||||
|
Loading…
x
Reference in New Issue
Block a user