We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7823d6e commit ee72767Copy full SHA for ee72767
1 file changed
include/xtensor/views/index_mapper.hpp
@@ -517,8 +517,9 @@ namespace xt
517
}
518
else
519
{
520
- assert(i < slice.size());
521
- return as_unsigned(slice(static_cast<typename current_slice::size_type>(i)));
+ using size_type = typename current_slice::size_type;
+ assert(static_cast<size_type>(i) < slice.size());
522
+ return as_unsigned(slice(static_cast<size_type>(i)));
523
524
525
0 commit comments