Skip to content

Commit 46ebc38

Browse files
WhiredPlancklotem
authored andcommitted
Fix deprecated declarations in C++17
1 parent 46b4779 commit 46ebc38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Segments.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#pragma once
2020

21+
#include <iterator>
2122
#include <sstream>
2223

2324
#include "Common.hpp"
@@ -53,8 +54,11 @@ class OPENCC_EXPORT Segments {
5354
managed.push_back(str);
5455
}
5556

56-
class iterator : public std::iterator<std::input_iterator_tag, const char*> {
57+
class iterator {
5758
public:
59+
using iterator_category = std::input_iterator_tag;
60+
using value_type = const char*;
61+
5862
iterator(const Segments* const _segments, size_t _cursor)
5963
: segments(_segments), cursor(_cursor) {}
6064

0 commit comments

Comments
 (0)