Fix util::array::indices iteration in case of empty array
This commit is contained in:
parent
4b7221db26
commit
8f6d48c605
1 changed files with 1 additions and 1 deletions
|
|
@ -241,7 +241,7 @@ namespace psemek::util
|
|||
std::array<std::size_t, N> idx;
|
||||
for (std::size_t i = 0; i < N; ++i)
|
||||
idx[i] = 0;
|
||||
return {idx, dims, false};
|
||||
return {idx, dims, std::any_of(dims.begin(), dims.end(), [](std::size_t d){ return d == 0; })};
|
||||
}
|
||||
|
||||
array_index_iterator_sentinel end() const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue