Refactor indexed view to appease MSVC 14.16.

This commit is contained in:
Antonio Sánchez
2024-04-12 17:05:20 +00:00
parent 5226566a14
commit dcdb0233c1
3 changed files with 200 additions and 200 deletions

View File

@@ -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]));
}