File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ class StrongIdIterator {
46
46
using difference_type = ssize_t ;
47
47
48
48
// /@brief Dereference operator (*)
49
- StrongId& operator *() {
49
+ StrongId operator *() const {
50
50
VTR_ASSERT_SAFE (bool (id_));
51
- return this -> id_ ;
51
+ return id_;
52
52
}
53
53
54
54
// /@brief += operator
@@ -75,6 +75,14 @@ class StrongIdIterator {
75
75
return *this ;
76
76
}
77
77
78
+ // /@brief Post-increment operator
79
+ StrongIdIterator operator ++(int ) {
80
+ VTR_ASSERT_SAFE (bool (id_));
81
+ StrongIdIterator temp = *this ; // Create a copy of the current object
82
+ ++(*this ); // Use the pre-increment operator to increment
83
+ return temp; // Return the copy
84
+ }
85
+
78
86
// /@brief Decremment operator
79
87
StrongIdIterator& operator --() {
80
88
VTR_ASSERT_SAFE (bool (id_));
You can’t perform that action at this time.
0 commit comments