1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
From: WhiredPlanck <whiredplanck@outlook.com>
Date: Sat, 5 Jul 2025 03:57:30 +0800
Subject: Fix deprecated declarations in C++17
---
src/Segments.hpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Segments.hpp b/src/Segments.hpp
index 2186dfd..57320fe 100644
--- a/src/Segments.hpp
+++ b/src/Segments.hpp
@@ -18,6 +18,7 @@
#pragma once
+#include <iterator>
#include <sstream>
#include "Common.hpp"
@@ -53,8 +54,11 @@ public:
managed.push_back(str);
}
- class iterator : public std::iterator<std::input_iterator_tag, const char*> {
+ class iterator {
public:
+ using iterator_category = std::input_iterator_tag;
+ using value_type = const char*;
+
iterator(const Segments* const _segments, size_t _cursor)
: segments(_segments), cursor(_cursor) {}
|