mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add support for plain-array as indices, e.g., mat({1,2,3,4})
This commit is contained in:
@@ -159,6 +159,12 @@ span(FirstType first, SizeType size) {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename T>
|
||||
Index size(const T& x) { return x.size(); }
|
||||
|
||||
template<typename T,std::size_t N>
|
||||
Index size(const T (&x) [N]) { return N; }
|
||||
|
||||
template<typename T, int XprSize, typename EnableIf = void> struct get_compile_time_size {
|
||||
enum { value = Dynamic };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user