Skip to content

Commit 540db3b

Browse files
bmcdormancdunn2001
authored andcommitted
Added arrow operator to ValueIterator and ValueConstIterator
1 parent f4b06cd commit 540db3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/json/value.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,8 @@ class JSON_API ValueConstIterator : public ValueIteratorBase {
10171017
}
10181018

10191019
reference operator*() const { return deref(); }
1020+
1021+
pointer operator->() const { return &deref(); }
10201022
};
10211023

10221024
/** \brief Iterator for object and array value.
@@ -1071,6 +1073,8 @@ class JSON_API ValueIterator : public ValueIteratorBase {
10711073
}
10721074

10731075
reference operator*() const { return deref(); }
1076+
1077+
pointer operator->() const { return &deref(); }
10741078
};
10751079

10761080
} // namespace Json

0 commit comments

Comments
 (0)