Skip to content

Commit b4357fa

Browse files
committed
Merge pull request #41 from bmcdorman/feature-arrow_operator
Added arrow operator to ValueIterator and ValueConstIterator
2 parents f4b06cd + 540db3b commit b4357fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: include/json/value.h

+4
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)