mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Refactor indexed view to appease MSVC 14.16.
This commit is contained in:
@@ -447,7 +447,7 @@ void check_indexed_view() {
|
||||
|
||||
// Check compilation of varying integer types as index types:
|
||||
Index i = n / 2;
|
||||
short i_short(i);
|
||||
short i_short = static_cast<short>(i);
|
||||
std::size_t i_sizet(i);
|
||||
VERIFY_IS_EQUAL(a(i), a.coeff(i_short));
|
||||
VERIFY_IS_EQUAL(a(i), a.coeff(i_sizet));
|
||||
@@ -812,7 +812,7 @@ void check_tutorial_examples() {
|
||||
{
|
||||
std::vector<int> ind{4, 2, 5, 5, 3};
|
||||
auto slice1 = A(all, ind);
|
||||
for (int i = 0; i < ind.size(); ++i) {
|
||||
for (size_t i = 0; i < ind.size(); ++i) {
|
||||
VERIFY_IS_EQUAL(slice1.col(i), A.col(ind[i]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user