Skip to content

Commit 5b0f54e

Browse files
Merge pull request #101 from SylvainCorlay/const-correctness
iterator::operator[] is const
2 parents 61ac598 + 7af6818 commit 5b0f54e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/xtensor-python/pystrides_adaptor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace xt
7979
inline reference operator*() const { return *p_current / N; }
8080
inline pointer operator->() const { return p_current; }
8181

82-
inline reference operator[](difference_type n) { return *(p_current + n) / N; }
82+
inline reference operator[](difference_type n) const { return *(p_current + n) / N; }
8383

8484
inline self_type& operator++()
8585
{

0 commit comments

Comments
 (0)