Skip to content

Commit 9aa4426

Browse files
WickedSmokeruevs
authored andcommitted
solvespace.h: Quiet std::iterator is deprecated warnings with C++17.
1 parent b4a7973 commit 9aa4426

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/solvespace.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,15 @@ enum class SolveResult : uint32_t {
179179

180180

181181
// Utility functions that are provided in the platform-independent code.
182-
class utf8_iterator : std::iterator<std::forward_iterator_tag, char32_t> {
182+
class utf8_iterator {
183183
const char *p, *n;
184184
public:
185+
using iterator_category = std::forward_iterator_tag;
186+
using value_type = char32_t;
187+
using difference_type = std::ptrdiff_t;
188+
using pointer = char32_t*;
189+
using reference = char32_t&;
190+
185191
utf8_iterator(const char *p) : p(p), n(NULL) {}
186192
bool operator==(const utf8_iterator &i) const { return p==i.p; }
187193
bool operator!=(const utf8_iterator &i) const { return p!=i.p; }

0 commit comments

Comments
 (0)