Change array_size result from enum to constexpr.
diff --git a/Eigen/src/Core/util/EmulateArray.h b/Eigen/src/Core/util/EmulateArray.h index 2b11552..4bfbbba 100644 --- a/Eigen/src/Core/util/EmulateArray.h +++ b/Eigen/src/Core/util/EmulateArray.h
@@ -204,19 +204,19 @@ template <class T, std::size_t N> struct array_size<array<T, N> > { - enum { value = N }; + static constexpr Index value = N; }; template <class T, std::size_t N> struct array_size<array<T, N>&> { - enum { value = N }; + static constexpr Index value = N; }; template <class T, std::size_t N> struct array_size<const array<T, N> > { - enum { value = N }; + static constexpr Index value = N; }; template <class T, std::size_t N> struct array_size<const array<T, N>&> { - enum { value = N }; + static constexpr Index value = N; }; } // end namespace internal
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 859d2f1..d2336ce 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h
@@ -303,30 +303,30 @@ */ template <typename T, typename EnableIf = void> struct array_size { - enum { value = Dynamic }; + static constexpr Index value = Dynamic; }; template <typename T> struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime & 0) == 0)>> { - enum { value = T::SizeAtCompileTime }; + static constexpr Index value = T::SizeAtCompileTime; }; template <typename T, int N> struct array_size<const T (&)[N]> { - enum { value = N }; + static constexpr Index value = N; }; template <typename T, int N> struct array_size<T (&)[N]> { - enum { value = N }; + static constexpr Index value = N; }; template <typename T, std::size_t N> struct array_size<const std::array<T, N>> { - enum { value = N }; + static constexpr Index value = N; }; template <typename T, std::size_t N> struct array_size<std::array<T, N>> { - enum { value = N }; + static constexpr Index value = N; }; /** \internal