Propagate compile-time size for plain arrays

This commit is contained in:
Gael Guennebaud 2017-01-06 22:01:23 +01:00
parent 3264d3c761
commit 76e183bd52

View File

@ -173,6 +173,10 @@ template<typename T, int XprSize> struct get_compile_time_size<T,XprSize,typenam
enum { value = T::SizeAtCompileTime };
};
template<typename T, int XprSize, int N> struct get_compile_time_size<const T (&)[N],XprSize> {
enum { value = N };
};
#ifdef EIGEN_HAS_CXX11
template<typename T, int XprSize, int N> struct get_compile_time_size<std::array<T,N>,XprSize> {
enum { value = N };