Fix compilation of Vector::operator()(enum) by treating enums as Index

This commit is contained in:
Gael Guennebaud
2017-09-07 14:34:30 +02:00
parent ea4e65bf41
commit 6d42309f13
4 changed files with 29 additions and 6 deletions

View File

@@ -366,6 +366,11 @@ void check_indexed_view()
VERIFY( is_same_eq( cA.middleRows<3>(1), cA.middleRows(1,fix<3>)) );
}
// Check compilation of enums as index type:
enum { X=0, Y=1 };
a(X) = 1;
A(X,Y) = 1;
}
void test_indexed_view()