Skip to content

Commit ee72767

Browse files
committed
fix type in assert
1 parent 7823d6e commit ee72767

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/xtensor/views/index_mapper.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,9 @@ namespace xt
517517
}
518518
else
519519
{
520-
assert(i < slice.size());
521-
return as_unsigned(slice(static_cast<typename current_slice::size_type>(i)));
520+
using size_type = typename current_slice::size_type;
521+
assert(static_cast<size_type>(i) < slice.size());
522+
return as_unsigned(slice(static_cast<size_type>(i)));
522523
}
523524
}
524525
else

0 commit comments

Comments
 (0)