Change array_size result from enum to constexpr.

This commit is contained in:
Antonio Sánchez
2024-02-22 22:52:25 +00:00
committed by Rasmus Munk Larsen
parent 8a73c6490f
commit feaafda30a
2 changed files with 10 additions and 10 deletions

View File

@@ -204,19 +204,19 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& array_get(const array<T, N>& a) {
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