Commit 922a659 1 parent 1ce44c3 commit 922a659 Copy full SHA for 922a659
File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 22
22
// It's using exceptions to demonstrate they are handled correctly by CLIF.
23
23
24
24
#include < array>
25
+ #include < cstddef>
25
26
#include < iterator>
26
27
27
28
namespace clif_iterator_test {
@@ -30,8 +31,14 @@ template<typename T, size_t N>
30
31
class Ring {
31
32
public:
32
33
// Mimic std containers, so that Ring::const_iterator is a real thing.
33
- class const_iterator : public std ::iterator<std::forward_iterator_tag, T> {
34
+ class const_iterator {
34
35
public:
36
+ using value_type = T;
37
+ using difference_type = ptrdiff_t ;
38
+ using pointer = T*;
39
+ using reference = T&;
40
+ using iterator_category = std::forward_iterator_tag;
41
+
35
42
// CLIF requires both or neither of copy/move constructors and copy/move
36
43
// copy assignment operators.
37
44
const_iterator (const const_iterator&) = default ;
You can’t perform that action at this time.
0 commit comments