Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarPythonic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarPythonic.hpp')
-rw-r--r--source/core/StarPythonic.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/core/StarPythonic.hpp b/source/core/StarPythonic.hpp
index 014e14e..0bfdc50 100644
--- a/source/core/StarPythonic.hpp
+++ b/source/core/StarPythonic.hpp
@@ -303,7 +303,13 @@ namespace RangeHelper {
STAR_EXCEPTION(RangeException, StarException);
template <typename Value, typename Diff = int>
-class RangeIterator : public std::iterator<std::random_access_iterator_tag, Value> {
+class RangeIterator {
+ using iterator_category = std::random_access_iterator_tag;
+ using value_type = Value;
+ using difference_type = Diff;
+ using pointer = Value*;
+ using reference = Value&;
+
public:
RangeIterator() : m_start(), m_end(), m_diff(1), m_current(), m_stop(true) {}
@@ -342,7 +348,7 @@ public:
return *this;
}
- RangeIterator operator-=(Diff steps) const {
+ RangeIterator operator-=(Diff steps) {
m_stop = false;
sanity();